Mobile Development Part 2: Android

So I’m diving into programming for mobile apps.  I’ll be developing ‘Hello World’ apps for OS’s with large market shares: IOS, Android, Blackberry, Bada, and Windows. This will help me gain some knowledge and spread the word. So, let’s go; first Up: Android.

The first thing you should do is download eclipse if you don’t already have it installed on your machine. This will allow you to skip steps Android’s development site suggests you take in setting up your development environment. The Droid team suggests you either download the Eclipse IDE for Java Developers, Eclipse for Java EE Developers or Eclipse Classic, but recommends the Classic version.

After Eclipse is installed, we need to install the Android SDK and Android Developer Tools (ADT). Go to [Help->Install New Software...]

install new software

On the ‘install’ dialog box, under the ‘work with’ drop-down menu click ‘add’.

Type in the a name and enter a location; in this case ‘https://dl-ssl.google.com/android/eclipse/’.


add site

Now you should be able to see the ‘developer tools’ tree view. Expand it and you’ll see the following:

  • Android DDMS
  • Android Development TOols
  • Android Heirarchy viewer
  • Android Traceview

For the sake of this tutorial you need only ADT; but, I downloaded all of them. They will install after you hit ‘finished’. You may have to restart, eclipse, I’m not sure. If you’re prompted to, please do.

Once you have ADT downloaded and installed, go to the Android SDK manager [Window->Android SDK Manager].

ASDK

Here you can download platform specific SDK’s and developer tools. I chose the platform with largest amount of users; Android 2.1 or API 7 as well as its samples and Google APIs. Click ‘install packages’.

They will also download and be installed automatically; you may need to restart Eclipse.

Now we’re getting close to actually coding. Create a new project.

In eclipse start a new project. [File->new project]

new-droid-project

new-project-screen

Click next.

For your package name, com.example.your-package-name. The com.example namespace is reserved for example documentation.

Click ‘create activity’ and set the name to your-project-nameActivity, chose the minimum SDK and click finish.

new-project

Before we start writing we have to set up the Android Virtual Device.

Go to Window->AVD Manager

AVD-manager

Once there click ‘new’. On the next screen, type in a name and select a (platform) target. Your choices available will depend on which platform(s) you downloaded. After choosing your target, click
Create AVD.

Now in the package viewer expand src->com.example.your-package-name->your-project-name.java->your-projectname.

project-tree-view

Now, we write some code. Underneath import android.os.Bundle; write

android.widget.TextView;

android.widget.textview

Under public void onCreate() function below super.onCreate(savedInstanceState) write:

TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);

Code

Click run.

You should see the Android virtual device pop-up. It took a while on
my machine to actually execute the program so wait for it to finish.

App-test

Boom! You’re finished.

Thoughts

Android has a huge market share and it’s growing. It’s obviously an OS that
developers should have at the very least some understanding of.

Here are some advantages and disavantages of Android.

Advatages:

  • Android customer reach
  • Plenty of support
  • Heavlily supported by Eclipse
    meaning you get to use an industry standard IDE -for free
  • Android is an open source OS
  • I didn’t pay anything for to develop the app.

Disadvantages

  • Too many platforms
  • On my machine the AVD didn’t run smoothly

Mobile Development Part 1

Yeah, I’m a bit behind, but, it’s better late then never. I’m looking into which platform would make me richest, fastest. I know there’s more to it than that but knowing which platform is in demand is a good start. Canalys says 48% of smart phones shipped, had Android on them, IOS came in second with 19% followed by Symbian with 16%, and Blackberry with 10%. Symbian’s annual growth though was -29%; the reason Nokia partnered with Microsoft. There’s Bada with 2% market share but a growth rate of 183%, and Windows with 1%. So over time I’ll be looking at Android, IOS, Blackberry, Bada, and Windows and start dev’ing.

Bill C-30

INVESTIGATING AND PREVENTING CRIMINAL ELECTRONIC COMMUNICATIONS ACT.

3. The purpose of this Act is to ensure that telecommunications service providers have the capability to enable national security and law enforcement agencies to exercise their authority to intercept communications and to require telecommunications service providers to provide subscriber and other information, without unreasonably impairing the privacy of individ-uals, the provision of telecommunications services to Canadians or the competitiveness of the Canadian telecommunications industry.

This part doesn’t seem that harmful. “…without unreasonably impairing the privacy of individ-uals…”  I wonder what ‘unreasonable’ invasion of my privacy would be; according in their terms.

Purpose of the request

(2) A designated person must ensure that he or she makes a request under subsection (1) only in performing, as the case may be, a duty or function

a) of the Canadian Security Intelligence Service under the Canadian Security Intelligence Service Act;

(bof a police service, including any related to the enforcement of any laws of Canada, of a province or of a foreign jurisdiction; or

(c) of the Commissioner of Competition under the Competition Act.

 

“…only in performing as the case may be a duty or function…”  Maybe the “designated person” is in court over traffic ticket he/she handed out and is looking for supporting evidence. I may be wrong but that may fall under “…a duty or function…of a police service, including any related to the enforcement of any laws of Canada, of a province…” The HTA fall under ‘…any laws… of a province” So instead of needing a warrant from a judge, a designated person may need info for that traffic ticket case that needs to be dealt with.

And this:

14. (1) The Minister may, at the request of the Commissioner of the Royal Canadian Mounted Police or the Director of the Canadian Security Intelligence Service and if in the Minister’s opinion it is necessary to do so, order a telecommunications service provider

(a) to comply with any obligation under subsections 6(1) and (2) in a manner or within a time that the Minister specifies

(b) to enable, in a manner or within a time that the Minister specifies, a number of simultaneous interceptions greater than any maximum or limit that would otherwise apply;

(c) to comply, in a manner or within a time that the Minister specifies, with any confidentiality or security measures respecting interceptions that the Minister specifies in addition to those referred to in subsection 6(2);

(d) to meet an operational requirement in respect of transmission apparatus operated by the service provider that the service provider would not otherwise be required to meet; or

(e) to meet an operational requirement in respect of transmission apparatus operated by the service provider in a manner or within a time that the Minister specifies.

 

So basically the Supreme Minister AKA Vic Toews wants to grant himself and law enforcement types, power that a judge has, when it’s obvious he isn’t responsible enough to wield it wisely. Giving himself and law enforcement  the power of a judge, to me, is unreasonable; never mind the obvious potential for abuse this act allows for, there’s no need for it.

Url Hacks

I took me three weeks to find an acceptable url-hack domain name for this blog. Anyway, this is my introductory post. I’ll keep thing technology related with some straight-up geeky things tossed in. I write code, design applications, design UI’s, design designs, think Aquemini was the greatest hip hop album ever, love supersport motorcycles and think there’s life on other planets. I’ll provide tutorials and discuss technology related news. As I write this I’m designing a changing in the look so things will change over time, but, thanks for finding me and enjoy.