Friday, August 30, 2013

Android Studio - Android's New Development Environment

Quoted from here.

"Android Studio is a new Android development environment based on IntelliJ IDEA. Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging. On top of the capabilities you expect from IntelliJ, Android Studio offers:
  • Gradle-based build support.
  • Android-specific refactoring and quick fixes.
  • Lint tools to catch performance, usability, version compatibility and other problems.
  • ProGuard and app-signing capabilities.
  • Template-based wizards to create common Android designs and components.
  • A rich layout editor that allows you to drag-and-drop UI components, preview layouts on multiple screen configurations, and much more."
At the time of typing this, Android Studio is still at a very early stage (0.2), but could still be used as an alternative to the original Android SDK that uses Eclipse for development.

Original Picture Link

Friday, June 14, 2013

Android Application Development - Version 1.1, Final Blog Post

It has come to the end of the semester, and I have just completed version 1.1 of QuickPanel.



v1.1 Changelog:
- Added "Silent Mode" checkbox feature to the volumes screen
- Static text is now black, dynamic text is now coloured blue
- Changed the layout of some of the textviews and changed their sizes
- Added a feature to show the amount of available RAM (includes a refresh button)
- Added a "Brightness Preview" screen, which includes a logo of the application and a test pattern; button to the preview screen is located directly under the brightness seekbar

I'm still not sure whether I will continue to work on this application, but if I do, I will make a new development blog dedicated more to the applications development news and such, and leave this blog for educational blog posts (for any good tutorials or books I find, or post good things for new developers to know, etc.).
Since this is a newer version, I'm re-uploading all the source code and stuff like I did last time, and I will also include a downloadable version of the application in .APK format, which can be installed using tools like Astro File Manager, ES File Manager, AirDroid, and other file managers.

QuickPanel 1.1 APK:
Mirror 1 - DropBox
Mirror 2 - Google Drive

Workspace Files (.zip):
Mirror 1 - DropBox
Mirror 2 - Google Drive

Saturday, June 8, 2013

Android Application Development - Source Code & Files

Since I consider the current progress of the application to be at the first version/"1.0", I thought I'd include all the applications source code and such, and since I might not have enough time to add any more to it (but if I do add more, I'll re-upload all the files and code for the application once the project is over).

I've gone through all the activity classes and commented all the Java code on what it does and such, but since a lot of it would just be constant repeating (like "....onCreate; //when the app starts..." which is in every activity class) I gradually repeated less and less things as I went through the classes, so the comments will make a lot more sense if they are read in this order:
-MainActivity
-VolActivitiy
-MenuActivity
-AboutActivity

The links below are just the four activities and their code and comments:
MainActivity
VolActivity
MenuActivity
AboutActivity

These links below are the entire project's workspace files, which includes everything (manifest, layouts, classes, images, etc.):
Mirror 1 - DropBox
Mirror 2 - Google Drive

Friday, May 31, 2013

Android Application Development - New Screenshots


- Added a menu when the app starts
- Added an information page which is opened when the user touches "About"
Volumes adjustment panel is fully working, thanks to ProgrammerGuru's sample.
Having a few difficulties with the toggles panel. If I can't get it to work then I'll just forget about adding it to the app (it's fairly simple to code and Android already has toggle buttons for things everywhere anyways).
Fixed problem with code not working in other activities, I was just loading the XML only, not the Java code as well, which is done by loading the activity's class through an Intent.

Saturday, May 25, 2013

Android Application Development - Progress Update

Changes so far:
- Brightness adjuster now saves as soon as you stop sliding it
- Brightness adjuster % no longer ends with ".0" or something like ".999999998"
- Added a on/off button (still needs coding) and an options link button for Wifi, Bluetooth, Airplane Mode, and vibrate
- Reorganized XML layout code and Java code a little more (will post source code with comments once project is finished)
- Fixed problems with the layout in Landscape Mode (screen sideways)


I've been working on adding volume adjusters and toggle buttons for various services, but I find that is already being enough of a challenge and a learning experience already, so it is all I'm going to attempt to add for this stage. In the process of learning how to do volume adjusters, I've actually figured out a few more things to improve the brightness adjuster from the first stage, which improvements are always good. Since the original apps activity or "screen" is becoming quite full as it is, I've been trying to add the volume adjusters and toggles on 2 more separate activities, which I've discovered causes a problem with the functioning of the Java code (although I'm thinking it's a simple line of code that I'm missing or a small setting that isn't set just right). The code compiles and runs completely fine, and I'm able to switch between activities without any problems, but the code literally has absolutely no effect on the app at all even though I get the normal and proper errors for the code if something isn't right. The code works perfectly fine if I copy everything to the apps main activity, which makes me believe that it's a small thing such as a missing line or setting that I haven't figured out quite yet, but I imagine I'll get there.

Also, if you're a beginner and are having difficulty understanding a few things, here's a list of a few definitions that I had trouble with in the beginning of this project or when I've worked with other languages before:

onCreate - This basically means "when the app starts", this is where you put all the things you want to happen when the app starts, like getting certain values, or defining certain items.

; (semicolon) - This is what you put at the end of a line, not just every line, but only a line that's finished, so there are some times that, usually for organization purposes, you will have a line or two that don't end with a ';' because these group of lines are actually read as one line by the computer (in a certain way). I think of it like a period in a sentence, a sentence can be 3 lines on a page, but just because it reaches the end of the line on the page doesn't mean the sentence is finished, it's only finished when you see the period at the end.

= and == - Though these are both "equals" they actually mean two pretty different things. '=' is what you would use when you're setting or declaring something, and '==' is used when your searching to see if something is something specific (whatever you put after the '=='). So '=' is like saying "is" and '==' is almost like saying "if it is".

!== - means the same as '==' just the '!' makes it mean "if it isn't".

public, protected, private - This is a little harder to explain, try checking out this link.

void - goes after the modifiers in the definition above (i.e. public void). This means that the function doesn't return anything to the code that called it. It's like someone calling you saying "Dinner is ready" and you heard them, they know you heard them, but yet you don't reply, because no reply is needed.

float - a number that can only go from 0.00(...) to 1.0.

int or Integer - a number without a decimal on the end.

String - text, which can also include numbers, and therefore can sometimes be converted and used like an integer (you'll see an example of this in my source code once it's posted).

When it comes to small things like this that the books don't always talk about or fully define and you get stuck on something, you just have to remember that Google is your friend.

Monday, May 13, 2013

Android Application - Stage Two Plans

I'm still currently polishing up the first stage features, like looking for improvements I could do and adding comments, reorganizing the code, etcetera. While I'm doing this I'm also planning what I'm going to do with the app next, and so far my goals of what I want to add are:
- Volume Adjusters (seek bars)
- Wifi/GPS/Data/Bluetooth/Sync on/off toggle buttons
- A really quick splash screen to show this logo
But since those seem pretty simple, and the stages are supposed to be more challenging, I'm going to try and think of something else I can add in that would be a bigger challenge. The app currently is installed on my phone and starts and performs extremely fast and hasn't crashed or had any problems yet.

Also, if you're new to Java or Android development and you're having any problems, I've found that StackOverflow has been a great amount of help for anything having to do with Java or Android. The website is almost like a "Yahoo Answers" for programming since you can read old questions that have been asked and solved, or you can create a new question and get a bunch of helpful answers. What I like about their community is that they don't just fix the code for you, but they actually explain it and explain what was wrong with your code so you actually learn.