Posts Tagged Android

How to get started in Android

Google have launched Android Training.  This will give Android beginners a step by step approach to getting started with Android.

It is a problem driven approach so each class will look at a problem and show how it should be approached.  There are plenty of sample apps to get you started.

I would recommend that you place close attention to the following classes:

Designing for Multiple Screens

This class will show you how to avoid common mistakes when trying to cater for the various Android screen sizes and also how to adapt your UI for various screen flows.  If you design your app with multiple screen sizes in mind from the start it will save you a lot of pain later.

Optimizing Battery Life

This is a great lesson that teaches you how to save battery power by disabling background tasks when the state of the device changes.  Such as loss of connectivity.

As well as Android Training, there are lots of other articles and tutorials.  This should get you well on the way to developing your first Android App.





Mobiletuts+ Tutorials

However, if you a looking for more Android tutorial resources, it is worth checking out Mobiletuts+ tutorials for Android.  They have lots of *really* good tutorials from beginner to advanced.   They also have some specialised premium tutorials that take you to the next level but there are lots of free ones to get you started.

 

Here is a sample of some of my favourite tutorials from Mobiletuts+:

 

How to Publish to the Android Market

This tutorial gives you step by step of how to get your finished app published in the Android Market from checking what permissions you require to deciding on the SDK compatibility.

 

 

 

Android Fundamentals: Working With Content Providers

This is the first of a series of tutorials on Android Fundamentals.   I would recommend working though all of the tutorials in this series.  This tutorial will show you how Android uses content providers to enable applications to share and use data.

 

 

 

Android User Interface Design: Working With Fragments

This tutorial is part of another great series from Mobiletuts+ on Android UI Design.  Fragments were introduced to allow you to break your UI into separate independent parts.  On a larger screen such as a tablet multiple fragments can be show at ones.   Fragments were introduced as part of  3.0 but you can add it to 1.6+ apps.   This tutorial will show you what you need to get started.

 

, , , ,

1 Comment

How to apply CCS3 media query techniques in Android Development

Here is a great post from RomanNurik on the Android developer blog.

The number of people working on mobile apps, and specifically Android, is growing fast. Since modern mobile software-development is a relatively new profession, the community is growing by sucking in experts from related domains, one being web design and development.

It turns out that familiarity with web UI development, particularly using modern HTML5 techniques, can be a great primer for Android UI development. The Android framework and SDK have many analogues to tools and techniques in the Web repertoire of HTML, CSS, and JavaScript.

In this blog post, we’ll walk through a few web development features and look for matches in the world of Android UI development.

He discuses how you can apply many of the custom layouts used in Css3 media queries in Android layout development.  Rather than repeating, the whole post here, jump over to the Android developer blog and have a look at the post.

, , , ,

10 Comments

Android Fragments now available for Android 1.6 or higher

Google have released the fragment API which is part of 3.0 as a static library.

Fragements allow screen elements to be broken into framents, that be arranged depending on the screen size of the device. This is great for 3.0 developers that develop for tablets as it allows you to also design for a smaller resolution screen.

Until now this was only available to android 3.0 but the new static library allows anyone that develops for Android 1.6 and higher to import the static library.

This library is available through the SDK Updater; it’s called “Android Compatibility package”.

If you wan to learn more about Fragments and what they can be used for, have a look at this post from Dianne Hackborn.

, , , , , ,

1 Comment

Android Honeycomb 3.0 out now with UI redesign for tablets

Google have released the final version of Android 3.0 with a major UI redesign for tablets. A host of features have been added to the platform to enhance the end User experience.



What are the major changes?

The new UI brings fresh paradigms for interaction, navigation, and customization and makes them available to all applications — even those built for earlier versions of the platform. Applications written for Android 3.0 are able to use an extended set of UI objects, powerful graphics, and media capabilities to engage users in new ways.

Visual multitasking

Multitasking allows users to swap between apps that are running on a device. This has been possible in the past but this new feature allows you to see the last view state of the application that you were running.

Multitasking is a key strength of Android and it is central to the Android 3.0 experience. As users launch applications to handle various tasks, they can use the Recent Apps list in the System Bar to see the tasks underway and quickly jump from one application context to another.

Fragments

3.0 allows developers to break an activity up into subcomponents called Fragments. They can then be combined in various ways. This will allow developers to show subset of fragments on a smaller screen while showing the full bells and whistle version on a large screen like a tablet.

For example, an application can use a set of Fragments to create a true multipane UI, with the user being able to interact with each pane independently. Fragments can be added, removed, replaced, and animated inside an Activity dynamically, and they are modular and reusable across multiple Activities.

Widgets

As you would expect, widgets have been redesigned for use on large screens. They are also a lot more interactive. The home screen widgets allow you to flip through content like 3D stacks, grids and lists.

Several new widget types are available, including a 3D stack, search box, a date/time picker, number picker, calendar, popup menu, and others. Most of the redesigned UI widgets can now be used as remote views in application widgets displayed on the home screen. Applications written for earlier versions can inherit the new Widget designs and themes.

New Animation framework

Developers can animate the properties of UI elements such as Views, Widgets, Fragments, Drawables, or any arbitrary object. Some of the animations available are fades or movement between states, loop an animated image or an existing animation, change colors, and much more.

Adding animation to UI elements can add visual interest to an application and refine the user experience, to keep users engaged.


Conclusion

I have only touched on some of the new features of Android 3.0 but check out the full highlights here. As well as the Android 3.0 Google, have also released a new version of the ADT Eclipse plugin. I have not touched it here as I intend to followup with a seperate post on the new feature. You can find out more on ADT here.

Android 3.0 signifies a major milestone in Androids history. It is be the most interactive version yet and will really enhance the tablet experience and well as the experience on smaller devices. Developers will be able to develop apps that look just as well on a Nexus as a XOOM without looking like you just increased the resolution on all your graphics. I will post a few more updates on the new feature once I have time to play with them.

Now all I need is a Xoom so I can test all of these features for myself….

, ,

No Comments

The Android Thread Police are coming….

As part of the Gingerbread release of android, a new API, StrictMode will allow developers to set a policy on a thread.

StrictMode is most commonly used to catch accidental disk or network access on the application’s main thread, where UI operations are received and animations take place. Keeping disk and network operations off the main thread makes for much smoother, more responsive applications. By keeping your application’s main thread responsive, you also prevent ANR dialogs from being shown to users.

StrictMode will only come into play if you select it and allows you to detect the following situations:

  • detect disk writes
  • detect disk reads
  • detect network usage
  • on a violation: log
  • on a violation: crash
  • on a violation: dropbox
  • on a violation: show an annoying dialog

Enabling StrictMode

StrictMode can be enabled in your applications onCreate method

public void onCreate() {
     if (DEVELOPER_MODE) {
         StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                 .detectDiskReads()
                 .detectDiskWrites()
                 .detectNetwork()
                 .penaltyLog()
                 .build());
     }
     super.onCreate();
 }

This blog post on the Android Developers blog by Brad Fitzpatrick will give you an overview of what you can expect. You can also check out the StrictMode API here for more details on what it allows.

, , , ,

No Comments