My First Requested Post! Android Programming πŸ€–

Android #17 is activated by Dr. Gero after Gero fails to terminate Goku. Oh, wait… Wrong Android, my bad! Android is a mobile operating system developed by Google, based on a modified version of the Linux kernel and other open source software and designed primarily for touchscreen mobile devices such as smartphones and tablets. For me, Android is a type of smartphone owned by people who couldn’t afford an iPhone. I am an Android user by the way.

It was Aquib from !nsΒ‘ght the Lost poet., I believe. He commented on my post and the topic somehow bent into Android programming. We just recently become friends… as-salāmu ‘alaykum. I hope this post will lead you into the programming world, I have to tell you though that it’s a trap!

Let’s get started

Basically, you can easily find the complete guide by visiting https://developer.android.com/ but then why I’m making this post! I’ll try to make it as simple as possible. To start, download the Android Studio. What? Studio? Relax it’s not a flat/apartment, it’s just a software. Don’t follow the instruction just yet because I’ll let you know a little secret in the end.

I’m going to use my old Android Studio, it’s been a long time since I code for Android. I was about to download the latest version but the size is just too big for my bad internet connection, it’s 758 MB in size. The latest version is 3.1.3, my Android Studio version is 2.3, let’s see if this will work on my Android phone version 7.1.2 N2G47H, it’s an Android Nougat for Xiaomi, I think, I’m not sure, haha.

There will be a welcome screen as most of the software out there. By the way, I’m using a Windows 10 Desktop Computer to develop this app. Start a new Android Studio project. New Project screen, there are some inputs but already filled, so it’s safe to continue, again, I think. Well, I keep clicking Next until Add an Activity to Mobile screen. In there, I choose the Basic Activity option, and for the last screen, I just click Finish.

It will take a while to open the project, wait until there is a play button like YouTube logo but green. Well, forget about the green YouTube logo there are so many complicated problems with the install via USB for my phone (β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻ , I try building the APK instead. After that, transfer the file to my phone and install it.

Screenshot_2018-08-07-00-37-09-007_com.example.dwi.myapplication

That’s it! I created an Android app, but is there any programming? No! Well not yet, that was just a Basic Activity application. But there will be codes already let’s see the generated code.

XML/Layout

XML stands for eXtensible Markup Language. XML was designed to store and transport data. XML was designed to be both human- and machine-readable.

android-programming-xml

I can see the code as well as a design, in this case, I can easily edit it with the Android Studio Layout editor which is Drag and Drop feature.

android-programming-xml-design

Java

Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.

android-programming-java

I think that’s all about it for the first timer.

The GitHub Link

The GitHub code that I shared was https://github.com/wordpress-mobile/WordPress-Android/compare/10.2

github-gradle

That was a Gradle file, and it is also generated in the current app. I was just trying to add some code references so I seemed to be smart, hahaha, sorry.

Secret

I believe this is not the only I can make an app in Android. I was making an Android Game using https://coronalabs.com/, which is very different approach with using Android Studio, and it seemed to be easier too, even it’s Cross-Platform, which means you can code once and build an application for another platform, like iOS for iPhone.

If you are new to programming I suggest you find an alternative like Web Programming. Android Programming using Android Studio is really “heavy” for a starter, I even try to avoid working in it, but if you know what it takes, just go for it! If there is a will there is a way (^.^)

Saving πŸ”– Post!

A while ago I tried to update my WordPress Android app. I noticed some major interface changes. The Reader view becomes prettier, other buttons as well, but the most important and the one I am going to discuss in this post is the bookmark symbol πŸ”– button in place with Like and Comment. Well now, it more like the trilogy than with the Follow button.

10.2:

  • New feature: Something there caught your eye? Read it any time with Save for later!
  • Various bugfixes.

All of WordPress.com related products (website WordPress.com, iOS app, Android app) are open source. The above quote is from the Android GitHub page. In the version 10.2, there is a change which mentioned that the users can Save posts. This is huge for a user like me. Please note that this post will only about the Android app and maybe a little about WordPress.com, I won’t talk about the iOS because I don’t have one, hahaha.

Usage

I tried to find an article that officially created by WordPress.com but couldn’t find any, meh, I didn’t try hard (XD), and this is my attempt to make it as my own post. As usual, I open my Android app, I go to the Reader, I find a new streams/category called Saved Posts. It will be empty or doesn’t appear, oh wait, I’ll check it… yes, the category will be available, but it is empty. I tried removing my saved posts and there will be an undo button.

Choose another category: Discover, Followed Sites, My Likes, or tags you have. You should see a post-cards with the new Save button if there isn’t try updating your Android app first (^.^). After clicking a post, try changing the category into Saved Posts, and voilΓ , there is a post in that streams, it’s not really a stream I think because it’s waiting for you to update the records for it, haha.

While I was resting from writing this post, I finally found the post from WordPress.com blog Bookmark Posts with Save For Later. But don’t stop here, I’d like to talk more.

Save is like Like

I used to use the Like feature as much as I wanted it with this bookmark feature. When I find an interesting post, make some posts as my references, or just to mark a specific post, I use the Like button to save it for later. But sometimes, I forget why I liked the post before, have I finished reading the post? or I just marked it.

The Like feature works similarly with the Bookmark. There is a category for the posts I liked. All the posts that I’ve liked will appear in that category. As I said before, I use the Like for different reasons, but then when I don’t follow up or forget, it will just make a mess, and mostly it just doesn’t work for multiple purposes.

Save isn’t like Like

I haven’t used the Save feature that much, but at least now I can minimize the mess I make using Like. The Like feature will notify the post’s owner, I don’t think the Save will, so I can click it multiple times without “distracting” people. But the Like still win, why? Because it works for multiple platforms.

While the Save feature only works locally in an app, Like is more global. When I mark a post using Like on the web for example, and then I open the mobile app, it will appear in the My Likes category. The Bookmark category doesn’t even exist in the web stream.