Smartphone Usage

T2813389789 I found this great site where you can create your own charts based on the data held against smartphone usage. So I tried it out and have got some expected and some surprising results. Read More...
0 Comments

Basics - Adding buttons in Android

As I have been trying to learn Android Development but with no previous programming experience it has become quite a struggle. I tried following guides on the internet but they weren’t making much sense to me as they weren’t covering the simple basics.

Mark, my employer gave me an Android For Beginners development guide which was much easier to follow. However the guide didn't cover the different ways you can achieve the same results.

For example, following the guide, I was writing code in the main.xml to create buttons . . .

<
Button android:layout_width="fill_parent"
android:text="Button"
android:id="@+id/button1"
android:layout_height="wrap_content"
></Button>
<Button
android:id="@+id/button2"
android:layout_width="fill_parent"
android:text="Button" android:layout_height="wrap_content"
></Button>
<Button
android:id="@+id/button3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button" ></Button>


. . which took a lot of time. Then Mark showed me how I could just easily drag and drop the actual button in the graphical layout.

Pasted Graphic


I Understand the guide was trying to return to absolute basics, in order to explain what the coding means. However not showing any alternative ways to do something so critical to app development was not very helpful.

It just shows you can’t beat having an expert on hand to help you along the way!
0 Comments

Using Market Intents

Sometimes, when developing, the functionality you require is already available via an Intent provided by another app. A list of these Intents is available here.

However in order to use these intents within your app the user also has to have the app with the intent installed on their device. If the user doesn't have the app installed you want to automatically point them to the apps that they require, i.e. open up the Android Market at the right page ready for them to install it. The user can then install the required app and perform a back action to return to your app. This can be achieved with a simple piece of code.

Lets say for example you want to incorporate barcode scanning within your app. You could utilise ZXing. So within the method where you are trying to access the intent (i.e. scan a barcode) you can add code like this:-

 

    1:       try
    2:         {
    3:             Intent newIntent = new Intent("com.google.zxing.client.android.SCAN");
    4:             startActivityForResult(newIntent, BARCODE_SCAN );
    5:         }
    6:         catch (Exception e)
    7:         {
    8:             String zxingUrl = "market://details?id=com.google.zxing.client.android";
    9:             Intent intent = new Intent(Intent.ACTION_VIEW,
   10:                     Uri.parse(zxingUrl));
   11:
   12:             intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
   13:             startActivity(intent);
   14:         }


The FLAG_ACTIVITY_NO_HISTORY value stops the marketplace from being kept on the history stack. so as soon as the user navigates away from it the marketplace is killed and the user will be returned to your app.
0 Comments

Helpful Android information for developers

As I have just started to get into Android development I have been searching around for a useful guide to help me progress my learning into the development of Apps. Android Blog Spot is the home for Android Developers. It has all the resources, references and a development guide which I am currently following at the moment. Anybody who wants to start learning Android Development I highly recommend for you to use this website.

Check out -

Android Blog Spot - provides project's news, tips and tricks and development examples.






0 Comments

Starting off

This is my first blog for the website, so let me introduce myself. My name is Liam. I am currently doing an internship with a local iPhone, Android and Blackberry App development company. Since I am new to this field I have been looking for a beginners guide for Android Development to get me started. Going through a dozen of websites I found that Android Developers was the most useful. It has loads of information to download from the development software to beginners tutorials. Now it is time to download the kit, install the components and get cracking on with my first project - Hello World, of course!
0 Comments