Hopefully there aren't too many hidden, hidden features - but here's some of the less well known and non-intuitive features available for Android that will definitely make your life easier and your apps better. All the source code for the platform and all the non-Google native apps is available for you to browse, download, borrow, or steal from the Android Open Source project. Using the resources framework, creating localized versions of your app is as simple as adding a new annotated subfolder (Eg.
Values-fr) that contains an XML file with strings in a different language (Eg. French). Android will choose the right folder at runtime for you.
The same resources framework lets you use alternate layouts for different hardware configurations, screen pixel densities, and input devices just by dropping them in named folder. Since Android 1.6, your app can produce results that will appear in the results from a homescreen Quick Search Box search. This is known as custom search suggestions.
Using Intents and Intent Filters your apps can make and service anonymous requests for an action to be completed (Eg. The Where app can request a table booking from the Open Table app). They can request an unknown application to complete an action without needing to know which application(s) can fulfill that request Your app can fulfill requests from unknown apps to complete actions without needing to know which apps will make the requests.
Play this right and you can create the 'default' Twitter app, or booking app, etc. Using Alarms you can set your app to complete tasks at predetermined times, even if your app isn't running. You can save a lot of battery life using the setInexactRepeating method to schedule regular events (like server polling or updates). It will synchronize alarms from multiple apps to occur at the same time rather than adhoc.
Using the Preferences framework you can create settings screens for your apps in the same style as the system settings. You can even incorporate system settings screens (Eg. Security and Location) into your application's settings hierarchy.
Using the AudioTrack and AudioRecord APIs, you can stream audio data directly from and to the PCM audio buffers.
2 +1 for realy many good points of interest – Alxandr May 25 '10 at 2:01.
The tools in the /tools directory of the SDK deserve a mention: our designer was particularly impressed with draw9patch which helped design stretchable buttons. He gave me assets from there, and I changed from a background colour to a 9-patch drawable and now we have a custom button, rounded corners, etc stretched to fit the text. Ddms, which is also integrated into the Eclipse plugin.It's immensely powerful, but I use it to take screenshots.
Adb - interact with your device or emulator from the command line. I use this to follow the logs from my device in a terminal window on my desktop, though I have found it useful for installing and uninstalling apps which are misbehaving. Sqlite3 - great for interacting with an installed database, and trying out queries.
Apkbuilder, zipalign, aapt - great for running headless builds monkey for fuzz-testing your app. I would also single out the three Designing for Performance, Responsiveness and Seamlessness, but I'd also like to add a fourth Coding for (Battery) Life. Although the Javadoc can be a little sparse at times, it helps no end to have the source right there for you to look at.
It is also very useful to have plenty of sample apps written by Googlers to build, examine and then see how they did it.
3 + 1 for mentioning monkey – Janusz Mar 5 '10 at 13:59 1 You missed another nice tool layoutopt. – 100rabh Oct 25 '10 at 13:08 Another good one missing that I use all the time is hierarchyviewer. – Artem Russakovskii Jun 3 at 20:57.
I guess I'll start then. A nice hidden feature I think is the Best Practices of the Android documentation. It lists plenty of great tips for designing responsive and fast apps.
Best Practices sections are: Supporting Multiple Screens (multiple sizes and resolutions) UI Guidelines Icon Design App Widget Design Activity and Task Design Menu Design Designing for Performance Designing for Responsiveness Designing for Seamlessness Another hidden feature is that these docs are available offline as part of the SDK. At first I was loading up a few pages every day for my morning train ride but didn't need to do that anymore after I found them in the SDK directory. If you use Eclipse, you will notice that it doesn't format XML files very well and when it does, it's very inconsistent (sometimes it splits the attributes by new lines, sometimes it doesn't).
To fix it, you can press Ctrl-Shift-F (auto-format). The rules Ctrl-Shift-F uses are in Window->Preferences->XML->XML Files->Editor.
1 The last one will for sure be part of my workflow. This was annoying me for the last week... Thanks you! – Mikle May 24 at 13:10.
Android supports XML 's which can be used as SVG-like drawables. Unfortunately there's no documentation for them. This is the best information I could find: escomic.net/217.
3 There is also idunnolol. Com/android/drawables. Html with a full documentation on all the xml features for shapes.
Shapes can be very important to do round courner backgrounds that change color when clicked or make xml defined gradients instead of custom background drawables. – Janusz Jul 21 '10 at 7:19 is it possible to add a number of shapes to one xml document. E.g.
A couple of circles and rectangles? – skyfoot Nov 4 '10 at 16:18.
Also with regard to best practices, you may want to check out Android coding style: source.android.com/source/code-style.html as well as the eclipse code and imports formatters (android-formatting. Xml, android. Importorder) which are found in the platform source code under development/ide/eclipse.
1 Style guide link is broken: should be source.android. Com/source/code-style. Html – Sam Mackrill Jun 11 '10 at 12:46 @sam fixed that link – pydave Nov 12 '10 at 21:39 2 There's a bit too many hoops to jump through to get the code just for the Eclipse formatter, so find it here: google.Com/codesearch/p?
Hl=en#CRBM04-7BoA/ide/eclipse/… – pydave Nov 13 '10 at 0:25.
Erarchyviewer in /tools allows you to debug/analyze your view layout: padding, positioning, view hierarchy etc. It saved me a lot of time a couple of times when trying to figure out why things are laid out the way they are.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.