Apps

Android Application Idea

Normally I’d write this up as an iPhone Application Idea but I think
it’s actually better suited to Android where it could run as a
background process.

Here’s the idea. Build a lightweight app that snapshots location (via
GPS) and 3G signal strength every ten seconds or so (possibly varying
sample time according to velocity) and submits the data to a webserver
that collates input from multiple users to build a detailed, high-res,
constantly updated map of 3G signal strength. Superimpose the results
on a Google Map and publish it for the greater good.

I haven’t checked to see if this is a) possible or b) original, but
I’ve been thinking about it for a while and I just wanted to get the
idea out there.

Posted via email from James’s posterous

LWUIT On Nexus One (Android) Device

A colleague of ours just got a new Nexus One device and I just had to try LWUIT on it…
I used Thorsten’s port to get started and made some minor UI tweaks using the resource editor. In the process I also added a new LWUIT feature (pure touch) to make the UI behave closer to the way it does on Android/iPhone devices (show focus only when using the keypad and hide it when not using the touch screen).

The result is in the video to your right, which I feel is pretty close to the performance/behavior of native Android applications and in some regards exceeds their capabilities (e.g. Tensile drag on Lists, Text components etc.).

The advantages of working with LWUIT on Android is identical to its advantages in JavaME, you can get fixes for LWUIT and statically link it to your application thus reducing your dependency on platform changes. This by definition makes LWUIT more resistant to platform fragmentation in Android just as it does in JavaME & BlackBerry devices (and hopefully on other devices as well).

Another smartphone app – for Google’s Android

Today, we’re announcing the launch of another service-based app for smartphones, specifically the ones that run on Google’s Android

Rapid Mobile Application Prototyping with PhoneGap

There is no doubt that carving out a mobile presence is a priority for many companies offering any type of product or service, or for start ups looking to gain rapid exposure. The Apple App Store has over 100,000 apps on it, and the Android platform is gaining ground. Those are just the cool kids – let’s not forget the grandfather of mobile technology, Blackberry. Others in the class include Palm, Symbian and of course, Windows.

Multiple Platforms
With so many platforms available there is a risk of losing focus on developing and producing applications as resources are expended on supporting multiple platforms – a necessary evil as each presents different development environments and eccentricities.
This is why PhoneGap really stands out at the moment as four [1] of the aforementioned platforms share a common factor – a WebKit-based browser. This doesn’t include BlackBerry’s announcement [2] of their new WebKit based browser to come in late 2010, which takes us to five out of the six platforms.

Enter PhoneGap
Where does PhoneGap sit in this picture? Well, it jumps off the canvas and sits in your lap! PhoneGap allows you to develop applications using HTML, CSS and JavaScript and provides a JavaScript API which enables you to interact with a device’s native functionality [3]. In addition to this simple application architecture, PhoneGap comes with build scripts/plugins (PhoneGap extension for XCode) which bundle up your pages into a deployable application.
The packaging and deployment to device for iPhone, Android and Palm was trivial; I can only speculate that the remaining platforms are equally easy to deploy. In light of recent Apple ‘crackdowns’, as of October 7th [4], 2009, it is worth noting that PhoneGap (version 0.8.0 and higher) is Apple approved.

The JavaScript advantage?
Anyone who has used a JavaScript library, Prototype, jQuery, MooTools etc, knows how powerful they can be. Anyone who has not used them can easily pick up JavaScript basics. The guys over at PhoneGap recommend using XUIJS[5] with PhoneGap as it does not contain a lot of cross-browser compatibility overhead and weighs in at < 10kb compared with jQuery at 24kb – although for simple functionality you may want to avoid using a extra library at all.
Due to the fact that we are ultimately aiming to work inside one browser implementation (WebKit), we are not held hostage by the browser compatibility issues that have haunted JavaScript for so many years. That’s not to say that fragmentation in the mobile world is not an issue [6].

Now, I am not going to try to argue that these HTML/JavaScript apps offer greater performance or a better user experience over their native counterparts. However, I will say that PhoneGap will allow the rapid development of an application for multiple platforms, using a single code base [7]. This is ideal for prototyping or for apps that will have a limited life span and do not warrant the time and investment of producing native apps.

Considering all of this in combination with

Sciphone N16, N17, N19, N21 Android Phones

Author: cndigit

This title has been glanced our recall of the previous SciPhone G2+ .a Shanzai phone running on Android OS, impressed by its featured robot charger. SciPhone later introduced genuine Android-powered N12, announced its possible availability in June,As Shanzai phone ‘s normal practice, its real

Install Android 2.1 USB Device Driver on Windows 7 64 bit

Windows 7 64 bit has difficulty installing the current USB drivers for Android devices. You’ll need these to actually test Android applications on a phone.

Feel free to poke around Control Panel for an hour trying to force it to recognize the drivers sitting on your hard drive. It simply won’t comply.

Luckily there is an easy work around– install PDANet. You can remove the program after installation– it will leave the drivers behind.

See:
http://forum.xda-developers.com/showthread.php?t=502010&page=22
http://androidforums.com/motorola-droid/35877-cant-get-tether-work.html

Java Developer Diaries; Developing Android Applications

On September 6th, 2007 i received a message from Chloe Arrowsmith of Google over Linkedin, asking if I am interested in a position Mobile Applications software engineering team they are building in London. As you may guess this team was setup for building Android and they didn’t hire me in the end :) .

Since then I am trying watch android closer. Frankly there things I like in android and there are things i don’t.

Android is a mature platform thanks to google’s strategy to release the sdk to public much before than any device available. When I start to deal with android i realized I am comparing every structure with iPhone and objective-c which is actually weird because I am a Java guy more than Objective-C. Like it or not iPhone and Objective-C is a well organized and elegant platform to work on and the deeper I dive into android sdk, the more I find things sometimes not so easy and well organized.

Honestly I am not really interested in JavaME since beginning since I find it a bit limited but new coming devices and SDK (such as Android and IPhone) are much more sophisticated and capable. Android offers much more than IPhone SDK can even imagine. You can code Activities which are the building blocks of user interfaces. You can use content providers to access and share data between applications. Besides you can use Intents to get noticed about various events, from hardware state changes to incoming data, to application events and also not only can you respond to intents, but you can create your own, to launch other activities, or to let you know when specific situations arise which you can’t on an IPhone. There is one other key stuff which IPhone lacks, the services which can keep running even not related to an activity, like keep listening messages even if you close the control unit of your instant messaging client.

These were the best and most promising part since most of them are only available on Android devices. However I find the UI and controller integration a bit troublesome. Also even if the UI controller structures seems like taken from Objective-C, they don’t seem as neat.

Enough talking lets see things in action;

If you had read my previous post on developing IPhone application, why don’t we just build the same on Android, which will use GPS, accelerometer and UI actions (if not you can go back to check the iphone post since it may lead you a better comparison, which is, however, not necessary). First of all I assume you downloaded and setup the Android SDK and ADT Eclipse Plugin. The installation is pretty straight forward and ran smoothly on mac and ubuntu (should be ok on windows too). I also assume you have basic knowledge of eclipse and java development on eclipse.

Fire up your eclipse and create a new android project, as if you are creating a java project.

Next type a project, application and package name. We also need to specify a target runtime which I choose 2.1. Since we are not using any new apis it should be ok to select as low as 1.5. Click finish to create your project.

You may have noticed some errors in your project which is actually not a real problem.

If you clean and rebuild you project the errors will be gone. This seems like a small issue in ADT plugin which should be either because of not running the incremental builders in project creation time or not cleaning the error markers after the first build, whichever it is, just nevermind.

The MainActivity class is created with an overridden onCreate method which is fired when the activity is first created. Android has a different way of UI declaration. Here the main.xml file under layout folder is used for creating the UI layout which also provides a visual designer. strings.xml under values folder is used to hold static values. We would be able to change those within out code. To be honest I really like this approach, it is quite easy, well organized and the visual designer is a great plus. Also if you are coming from a xml declarative platform such as Flex(MXML) or Silverlight(XAML) you won’t find it much different (which actually is).

Even at this stage you might realized Android application has much less files than an iPhone application (can check previous post). Although these makes it appear simpler and easier to start with, the deeper you go you realized Objective-C is a bit more organized. Open MainActivity class which acts as the view controller. The basic usage of the APIs would not be very different than iPhone, we are going to implement a listener interface, register or class as the listener and code the implementation method.

Lets start with building our interface, the default view already has a TextView printing hello. We can modify this one and add another to display our latitude and longitude.

   

You may also noticed ‘id’ attributes are added in order to access this components within the code. As I mentioned before this approach is much like other XML declerative platforms. By the way if you feel comfortable (or brave enough) you may also try tweak the UI using the layout view.

Since this should be enough for the view lets go back to our activity class. The MainActivity class is created with an overridden onCreate method which is fired when the activity is first created.

First lets create two TextViews to control our UI code and get the LocationManager to access the GPS.

public class MainActivity extends Activity {

 private LocationManager locationManager; private TextView latitude; private TextView longitude;

 @Override public void onCreate(Bundle savedInstanceState) {  super.onCreate(savedInstanceState);  setContentView(R.layout.main);  //bind the ui components to code referances  latitude = (TextView) findViewById(R.id.latitude);  longitude = (TextView) findViewById(R.id.longitude);  //get the locationManager  locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); }    //...

So far the most suprising thing for me was the need to bind the UI components to code references manually via findViewById method. Honestly this seems a bit unnecessary and weird. I was expecting the compiler to access UI components dynamically (as in other xml declarative languages) or use visual tools to do the job (as in interface builder on mac). This seems fine for now but more complicated views might become troublesome.
Since we are mostly done with the UI code we can start utilizing the GPS. We already added and initiated the location manager.

This would be enough get the location manager but to get the location updates we need to register a listener. To keep things simple and more like what I did in the iPhone tutorial, I am going to implement the needed listener interfaces to our activity class. You may prefer to create anonymous listener classes.

public class MainActivity extends Activity implements LocationListener {

Next we create two methods to register our class as the listener of the location updates via using locationManager.requestLocationUpdates method. This method provider constant, minimum time interval, minimum distance interval and finally the listener class.

 private void startListening() {  //registers our class as the listener  locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0,    0, this); }

 private void stopListening() {  locationManager.removeUpdates(this); }

Since the methods are ready we can call startListening in onCreate method to register our class as the listener of location updates.

  ...  locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);  startListening();  ...

Implementing the LocationListener interface brings four new methods to be implemented. To avoid errors lets create those and also implement the onLocationChanged method.

 public void onLocationChanged(Location location) {  latitude.setText(location.getLatitude()+"");  longitude.setText(location.getLongitude()+"");  stopListening(); }

 public void onProviderDisabled(String provider) {  // TODO Auto-generated method stub

 }

 public void onProviderEnabled(String provider) {  // TODO Auto-generated method stub

 }

 public void onStatusChanged(String provider, int status, Bundle extras) {  // TODO Auto-generated method stub

 }

Any new location update will trigger onLocationChanged method. However we don’t need any update after we get the locations so as we get location update we assign those to UI text fields and call stopListening to unregister our listener class.

As you may remember from the iPhone post we want our application to update the location info when we shake the handheld. To achieve this we need to ask the sensor service to inform us on accelerometer events. This approach is a bit primitive when compared to shake API introduced in iPhone OS 3. However it is much or same with the older iPhone OS. First lets get the sensor manager.

 private SensorManager sensorManager;

And in onCreate method initialize the sensorManager and add a listener.

  ...  sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);  sensorManager.registerListener(this, sensorManager.getSensorList(    Sensor.TYPE_ACCELEROMETER).get(0), 100);  ...

We also need to implement a new interface to let our class to become a listener for SensorEvents.

public class MainActivity extends Activity implements LocationListener, SensorEventListener {

Adding the interface will cause errors because of unimplemented methods. Add the needed methods and implement the onSensorChanged method to detect shake and reregister for GPS updates.

 // The threshold value to detect shake private float kThreshold = 1.2f; public void onAccuracyChanged(Sensor sensor, int accuracy) {  // TODO Auto-generated method stub } public void onSensorChanged(SensorEvent event) {  if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {   float[] values = event.values;   if (values[SensorManager.DATA_X] > kThreshold     || values[SensorManager.DATA_Y] > kThreshold     || values[SensorManager.DATA_Z] > kThreshold) {    startListening();   }  } }

Finally we want our UI to respond and rotate according to orientation changes. Unlike the iPhone counterpart, android does not need any code change for this purpose, just tweak the AndroidManifest.xml and it is done!

       

Although ADT offers visual editors for this xml file, it is not possible to change the screenOrientation parameter visually.

Now we are ready to run our application. Android SDK comes with an emulator. To set up new virtual devices, use awd manager.

You can add virtual devices varying from version 1.1 to 2.1. The SDK comes with 2.1 version but other packages can also be downloaded from available packages section.

Be careful about not choosing an older AVD version than the project build target you choose, shown in figure 2. As our AVD is ready now we can run the application. Right click on the project and select run as android application.

This should fire the emulator and deploy your project which should get an error as shown below.

Unlike iPhone, Android offers much more services and integration to developers which brings up another problem, the security. Android programming model expects you to declare the resources you want to use at the time of installation, so instead of asking permission each time the application started, Android lets the user know what the application doing during installation. While this approach is much simpler and less pain for the user, it will also provide eternal access to resources once user confirms.

To add those permissions open the AndroidManifest.xml and go to permissions tab.

Click add.

And add ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION permissions from the dropdown.

Finally our application is really ready to run. I had some difficulties getting location data on the emulator. Also shaking the emulator window didn’t cause the accelerometer to detect any shake. However when I deployed the application on a real device everything ran smoothly. Later i realized I need to install SensorSimulatorSettings.apk to get mock location and trigger shake. To install use the following command;

%ANDROID_SDK_HOME%/tools/adb install SensorSimulatorSettings.apk

You can also refer this post for more info about SensorSimulatorSettings.

The running application should be similar to the screenshot below, responding to shake and orientation changes. (BTW thanks to Google giving the developer phone last year at I/O).

Android is a very promising platform and although its quite young its already quite mature. I will later write another post comparing iPhone and Android development but to tell the truth staying in Java and having a more open and flexible platform feels more comfortable. However when compared to iPhone documentation, samples and even books are still might not be as good.

Google vs. Apple: An epic battle

By David Goldman, staff writerMarch 4, 2010: 11:14 AM ET NEW YORK (CNNMoney.com) — Let the smartphone smackdown begin.

In the blue corner, wearing black, weighing in at 4.8 ounces, the 31-month champion of the touch screen phones: Apple’s iPhone!

In the red corner is the challenger, appearing on every carrier, a new entrant to the heavy-weight battle: Google’s Android!

It doesn’t take Michael Buffer’s “let’s get ready to rumble” introduction to know that Apple and Google are squaring off for what looks to be an epic battle of the smartphone platforms. Apple made that loud and clear on Tuesday when it announced it would sue HTC, the maker of the Nexus One “Google phone,” over 20 alleged patent violations.

Experts say Apple is an aging champion that is feeling threatened by the momentum surrounding new-to-the-game Google’s Android platform.

Steve Jobs: A man aggrieved “Apple set the bar and now it’s being toppled,” said Will Stofega, program director of mobile device technology and trends at IDC. “Apple is playing defense, and Google is playing offense.”

Although it may seem that Google (GOOG, Fortune 500) and Apple (AAPL, Fortune 500) are the only contenders battling it out in the U.S. smartphone market, that’s simply not true. In fact, neither is even the largest.

That “biggest” award goes to BlackBerry maker Research In Motion (RIMM), which commands 41.6% of the market, according to technology data tracker comScore. Apple’s iPhone OS is is second place with 25.3%, and phones that run Google’s Android operating system are in fifth with 5.2% of the market.

Battle for the data belt But there is an all-important metric that sets Android and iPhone OS apart from the competition: data. Heaps and heaps of data.

The iPhone, iPod Touch and the handful of smartphones that run Android accounted for a whopping 86% of the data downloads from U.S. smartphones in January, according to a recent study by Web advertising company AdMob. IPhone OS downloads accounted for 47% of the data requests across the nation, and Android accounted for 39%.

That’s important for consumers, because it means they’re getting more functionality out of iPhones and Android-based phones, which is, after all, the point of getting a smartphone. Those phones give users a seamless, computer-like browsing experience, and they offer by far the most apps.

The iPhone App Store has more than 100,000 apps. Google’s Android Market has 20,000. The next biggest competitor is RIM with several thousand and Palm’s (PALM) WebOS just crossed the 1,000-app threshold.

It’s not just size that counts, it’s how you use it: iPhone and Android users download an average of just under 9 apps per month, according to AdMob. The next largest contingent is Palm, which sees an average of 5.7 apps per month downloaded.

“People are more engaged with their iPhones and Android phones due to the browsing experience,” said Soumen Ganguly, principal at tech consultancy Altman Vilandrie & Co. “That’s where BlackBerry generally lags by quite a bit.”

Data usage also gives Google and Apple an edge over the competition, because more data usage means more revenue. Apple takes a 30% cut from the apps that it sells, and Google makes money when people search on Google or visit Web sites that feature ads supported by Google.

It may be too soon to count out any of the smartphone players just yet, given how quickly new technologies develop. RIM recently said that it planned to improve its browser functionality and Microsoft (MSFT, Fortune 500) wowed spectators with its Windows Phone 7, which is set to be unveiled this fall.

But some say it’s Android and iPhone OS, more than any other smartphone platform, that are making the greatest strides in the race to be market leader.

“Looking to the future, it is primarily between Google and Apple to shape the future of the mobile industry,” said Jagdish Rebello, principal analyst of communication systems at iSuppli Corp. “When you look at what Google and Apple are doing with applications and creating an ecosystem … others are just playing catch-up.”

Blow by blow Google and Apple have taken very different approaches to the battle. Here’s a look at how that bout is playing out:

Apps: Apple is winning the app war now, with about five times more apps than Google. But app developers have to get their products cleared by Apple’s standards police (remember the 6,000 sexy apps that got purged last week?) before they can appear in the App store. That’s a process that can take months.

Google has taken the opposite approach, opening its platform to developers. IDC’s Stofega says that developers are embracing Google’s approach, and as Android adoption grows, more developers are writing Android apps. That could bring some of the higher-quality apps to Google’s side. Google has a lot of ground to cover, but app war may just be beginning.

Devices and prices: IPhone OS runs on three devices: the iPhone 3G S, the iPhone 3G and the iPod Touch, with prices ranging from $99 to $299 with a new contract.

Android is currently available thorugh three carriers on on 10 smartphones in the U.S., with prices ranging between $79 to $199 with a new contract. It also runs on a number of other devices, including several netbooks and the Barnes & Noble Nook e-reader.

6 ways iPhone and Android differ ISuppli’s Rebello said Google’s strategy of offering Android on more phones, with more carriers and varying price points was the same winning strategy for RIM’s BlackBerry devices.

“Apple has a confrontational ‘our way or the highway’ strategy, but it’s the Google model that’s winning over carriers,” he said.

Availability: The iPhone is available exclusively on AT&T (T, Fortune 500) in the United States, and there have been well-documented problems with how that partnership has negatively impacted many customers’ experiences.

Google is carrier agnostic and, unlike Apple, allows wireless companies to take a cut in the app revenues. As a result, wireless companies are embracing Android. The only major U.S. carrier without an Android phone is currently AT&T, but the wireless company just announced it will begin to sell five Android phones by June.

“Google’s strategy isn’t about keeping one carrier happy but about enabling mobility, hardware and software to a variety of different tiers,” said Stofega. “There are advantages to serving a number of different masters, and that’s where Apple has some problems.”

http://money.cnn.com/2010/03/04/technology/google_apple_mobile/index.htm?cnn=yes

[Via http://craigtrover.wordpress.com]

Baby break


Hey friends – I had to make a break, because I became father! I don’t know, what you could think, what this means to me – I am a papa now! No words can tell you my luck.


And I moved from Berlin in Germany to Rome in Italy and hey, my new life needed some special attention.

Ok, now I continue my work here and I will answer all your nice feedbacks, that reached me in the last weeks.

There will come a new tool as soon as I solved some small problems regarding money. But you all now, money is just an abstract idea – but sometimes it could be useful…

I’ll be back soon and publish a new tool for you, if you want or not ;-)

And for the people, who are here only to look for a new version of “volume control”: Just ignore this message! :-p



Smule Won’t Be Porting Its iPhone Apps to Android

Smule has revealed that they don’t have plans to move their successful iPhone applications to Android due to the high costs involved.

Smule is the company responsible for many popular iPhone apps including, “Sonic Lighter”, “Leaf Trombone”, and “I Am T-Pain”.

Jeff Smith the developer behind Smule tells MediaMemo that he doesn’t like the way the [Android] store merchandises its wares, and he doesn’t want to have to create different apps for each handset Android supports.

These concerns are likely shared amongst many iPhone developers. This gives Apple a huge step up especially when it comes to the iPad. A little incremental programing to make their application fit a larger form factor is relatively simple in comparison to redesigning and redeveloping from scratch for a different operating system.

More in the video interview below…

Read More