Showing posts with label android sdk. Show all posts
Showing posts with label android sdk. Show all posts

Thursday, September 25, 2008

Installing Google Android SDK 1.0 On Ubuntu 8.04 Desktop

Falko Timme put together a nice guide together. The guide explains how you can install the Google Android SDK 1.0
on an Ubuntu 8.04 desktop. With this stable release of the Android SDK,
you can now develop applications for Android smartphones (like
T-Mobile's G1) and offer them on the Android Market.

Take a look at the guide if you are interested in developing apps for android on Ubuntu.


Monday, September 8, 2008

Android Photostream

Photostream is a simple photos browser and viewer for Flickr. All you need to use it is a Flickr screen name or user name.



This application serves as an illustrative example of several Android features and APIs:


  • Activity aliases
  • Adding custom shortcuts to Home
  • Adding a new wallpaper chooser to the system
  • Custom layouts
  • Custom XML attributes
  • Use of themes
  • Use of styles
  • Use of text colors
  • Use of <include>
  • Use of bitmap and layer drawables from XML
  • Use of HttpClient
  • Proper interaction between background threads and the UI thread
  • Efficient display rotation (using the new onRetainNonConfigurationInstance() API)
  • Animations and layout animations
  • Cropping an image
  • Image manipulation



Type in Home, to create a shortcut to any Flickr account. The shortcut
shows a custom icon, downloaded from the Flickr user profile:




If you plan on reusing the source code to access Flickr in your own application, you should modify the Flickr.java file to replace the existing API key with your own. The application source code also contains a very handy class called UserTask.java. This class is designed to help you easily write background operations that interact with the UI thread.

http://android-developers.blogspot.com/2008/09/android-photostream.html







Wednesday, August 27, 2008

Why Google Removed some API's from Android 0.9 SDK Beta

From Android Developers Blog

GTalkService
We were all really excited when the "XMPPService" (as it was called, at first) was included in the first early-look SDK. Once we brought in our security review team to examine Android, however, they soon realized that, as exciting as it is, the GTalkService has some fundamental security problems. Rich Cannings is one of our security researchers, and here's his explanation of the issues:

When I first read about GTalkService, I was both excited and scared. As a developer, I was interested in a feature that provided a simple interface to send messages between two Google Talk friends. The messages would appear on the receiving device as a standard Intent that was easy to handle. How simple and beautiful is that? Unfortunately, when I put my tin foil hat on, I recognized that things are a little more complicated than that.

We decided to postpone GTalkService's data-messaging functionality for the following reasons:

1. "Repurposing" Google Talk Friends
Google Talk friends are intended for a different purpose than that envisioned by the GTalkService. Your Google Talk friends can contact you at any time via IM. They can see your email address and often can see your real name. However, the idea of a Google Talk friend does not always line up with the types of people who may want to interact with via an Android application. For example, imagine a really cool mobile Massively Multiplayer Online Roleplaying Game using GTalkService. You would have to add all the players to your Google Talk friends list in order to play with them. Next time you log in to Google Talk from your desktop or on the web, you would notice that you have many new "friends". You may not want to chat with these friends -- and perhaps worse, you may not want them to know what your real name or email is. We do realize that Android users will want to interact with other Android users anonymously and for short periods of time, especially in gaming scenarios. Unfortunately, it turns out that using Instant Messaging is not really a good way to do that.
2. Verifying Remote Intent Senders
Intents were designed to send messages within the device. The Intent subsystem can conclusively determine who sent Intents only when the Intents originate from the same device that services the Intent. When Intents come from other devices, the Intent subsystem cannot determine what application sent the Intent. This can lead to a variety of problems. At first, remote applications could send arbitrary Intents, meaning that your Google Talk friends had almost the same control of your device as you did. Even once that issue was resolved, we recognized that we could not trust the identity of the application who sent the request. We could only trust the identity of the user. So a "bad" application on your friend's device could send a message to a "good" application on your device which would negatively affect the good application. In the end, we determined that the Intent system, as designed for local use, did not lend itself well to being the vehicle for a Remote Procedure Call (RPC).
3. Placing Too Much Security Burden on Developers
As originally designed, the GTalkService placed a significant burden on the application developer to avoid security flaws and perform user and relationship management. An Android application using GTalkService would be reachable from all of the user's Google Talk friends, and a flaw in that application could pose an inviting target to a malicious "friend" or automated malware. There are automated mechanisms that could be used to help protect vulnerable applications or stop the spread of malware, but the deployment of these technologies was not possible in time for the launch of the first Android handsets.

Although we would have loved to ship this service, in the end, the Android team decided to pull the API instead of exposing users to risk and breaking compatibility with a future, more secure version of the feature. We think it's obvious that this kind of functionality would be incredibly useful, and would open lots of new doors for developers. One of our top priorities after the first devices ship is to develop a device-to-device (and possibly device-to-server) RPC mechanism that is fast, reliable, and protective of developers and users alike.

As a final note, I want to point out that since the GTalkService was always a Google "value-added" service anyway, it was never guaranteed that it would be present on every Android device. That is, GTalkService was never part of core Android. As a result this change actually allows us the potential to build a new system that is part of the core of a future version of Android.

Bluetooth API
The 1.0 version of Android and the first devices will include support for Bluetooth; for instance, Android will support Bluetooth headsets. In the early-look SDKs, there was an incomplete draft of an API that exposed Bluetooth functionality to developers. Unfortunately we had to remove that API from the 1.0 release. To get the skinny on why, I contacted Nick Pelly, one of the Android engineers responsible for that functionality. Here's the story on Bluetooth, in Nick's words:

The reason is that we plain ran out of time. The Android Bluetooth API was pretty far along, but needs some clean-up before we can commit to it for the SDK. Keep in mind that putting it in the 1.0 SDK would have locked us into that API for years to come.

Here's an example of the problems in the API. Client code is required to pass around IBluetoothDeviceCallback objects in order to receive asynchronous callbacks, but IBluetoothDeviceCallback is meant to be an internal interface. That client code would break the moment we added new callbacks to IBluetoothDeviceCallback.aidl. This is not a recipe for future-proof apps.

To make things even more tricky, the recent introduction of the bluez 4.x series brings its own new API. The Android Bluetooth stack uses bluez for GAP and SDP so you'll see more than a passing resemblance to bluez's interfaces in Android. The bluez 4.x change requires us to carefully consider how to structure our API for the future. Again, remember that once we settle on an interface we need to support it for years going forward.

Rather than ship a broken API that we knew was going to change a lot, we chose not to include it. We absolutely intend to support a Bluetooth API in a future release, although we don't know exactly when that will be. This should include some tasty features, such as:

* Bindings to GAP and SDP functionality.
* Access to RFCOMM and SCO sockets.
* Potentially, L2CAP socket support from Java. (This one is under consideration.)
* An API to our headset and handsfree profiles.

On a personal note, Nick adds, "I would love nothing more than to start seeing some neat third-party applications and games over Bluetooth. In my opinion, Bluetooth is completely under-utilized on most mobile platforms and I'm excited to someday see what the developer community can do with Android."

I'm definitely bummed about these API removals. I was particularly looking forward to the P2P capabilities offered by GTalkService, but, as always, user security and privacy must come first. In all these cases, we'll work with the developer community to create some great APIs that balance these concerns.

Thursday, February 14, 2008

Google releases new Android SDK

Android SDK m5-rc14 now available today.


There are a couple of changes in m5-rc14 I'd like to highlight:

  • New user interface - As I mentioned when we introduced the m3 version
    of the Android SDK, we're continuing to refine the UI that's available
    for Android. m5-rc14 replaces the previous placeholder with a new UI,
    but as before, work on it is still in-progress.
  • Layout animations - Developers can now create layout animations for their applications using the capabilities introduced in the android.view.animation package. Check out the LayoutAnimation*.java files in the APIDemos sample code for examples of how this works.
  • Geo-coding - android.location.Geocoder
    enables developers to forward and reverse geo-code (i.e. translate an
    address into a coordinate and vice-versa), and also search for
    businesses.
  • New media codecs - The MediaPlayer class has added support for the OGG Vorbis, MIDI, XMF, iMelody, RTTL/RTX, and OTA audio file formats.
  • Updated Eclipse plug-in
    - A new version of ADT is available and provides improvements to the
    Android developer experience. In particular, check out the new Android
    Manifest editor.
You can download the new SDK here:
http://code.google.com/android/download.html

Upgrading?



If you have already downloaded an earlier version of the SDK and developed applications on it, please read the Upgrading the SDK document instead. The Upgrading document explains
how to migrate your existing development environment and applications to the new SDK release. The document also provides
information that you will find useful during the upgrade, such as lists of framework and API changes.

To develop Android applications using the code and tools in the
Android SDK, you need a suitable development computer and development
environment, as described below.



Supported Operating Systems


  • Windows XP or Vista
  • Mac OS X 10.4.8 or later (x86 only)
  • Linux (tested on Linux Ubuntu Dapper Drake)


Supported Development Environments




Note: If JDK is already installed on your development computer,
please take a moment to make sure that it meets the version
requirements listed above. In
particular, note that some Linux distributions may include JDK 1.4 or
Gnu Compiler for Java, both of which are not supported for Android
development.

Take a look at our extensive gallery of pics right here.




Technorati Tags: , , ,

Monday, February 4, 2008

Google updating Android dev kit


Google today said it would upgrade the developer kit for its Android mobile OS, providing a significant upgrade to the Linux-based software based on feedback from programmers. The company does not say exactly what its enhancements will include but notes that both the user interface and the programming interface itself will receive upgrades. The delay is enough to justify pushing back the deadline for the Developers Challenge until April 14th, Google says, though the change will not force any software developers to migrate to the new code in the same timeframe.

"We're looking forward to seeing some great apps, especially after we've had a chance to incorporate some of your feedback into the Android platform," says Google's Developer Advocate Quang Nguyen.

The change is believed to be in response to numerous bug complaints from developers, who in the early stages of development criticized Google for supplying too little documentation and requiring excessive steps to accomplish simple user interface goals.

[Via:Electronista.com]



Technorati Tags: , , , ,