Codota is a website proposing Android code snippets on various subjects. Although they don't have much content yet, the idea seems great. Anyway I'm more interested in their new Chrome Extension : Livecode.
This extension will make all Android classes and methods clickable on Codota an Stackoverflow. Clicking will then display the official documentation of the class / method directly. This is just a great tool when you spend your time on StackOverflow !
When deploying an app on a Store, be it Google's Play Store or Amazon's, or any other, a developer needs to create goodlooking screenshots. And often, the screenshot is not as clean as it can, mainly because of the status bar, showing a low battery, or numerous icons (unread mails, social network notifications, ...).
Screenshot Cleaner takes your screenshot and cleans the status bar, making your screenshots look professional.
Source : @francoisblavoet
Sometimes, you want an Activity or a Broadcast Receiver to listen for a specific intent, which is not always easy to test. There are some applications, like With Intent which let you declare and send an intent. But you then need to be outside of your app.
I just discovered that you can use ADB to send an intent to any device (physical or emulated). Here are a couple of sample command you can run in your shell (assuming your sdk/platfor-tools is in your path) to start activities.
# specifying the action and data uri
adb shell am start -a "android.intent.action.VIEW" -d "http://developer.android.com"
# specifying the action, mime type and an extra string
adb shell am start -a "android.intent.action.SEND" --es "android.intent.extra.TEXT" "Hello World" -t "text/plain"
# specifying an explicit component name
adb shell am start -n "com.example.application/.MainActivity"
And of course you can also start a service or broacast an intent
# specifying an explicit component name
adb shell am startservice -n "com.example.application/.BackgroundService"
# specifying the action
adb shell am broadcast -a "android.intent.action.PACKAGE_FIRST_LAUNCH" -d "com.example.application"
You'll find all the options you can use in the Official Documentation.
Those who have used the adb tool might have stumbled upon the following message :
$ adb logcat
- waiting for device -
error: more than one device and emulator
In such case, you need to find, then specify the device's serial like this :
$ adb devices -l
List of devices attached
XXX900AKC2 device usb:3-1.3 product:falcon model:XT1032 device:falcon_umts
XXXBDAD913017009 device usb:1-1 product:yakju model:Nexus device:maguro
$ adb logcat -s XXXBDAD913017009
Here I used the logcat command but it's the same thing when you want to install an apk or pull a file from a device.
I've just discovered that if you don't specify a serial, adb will look for an environment variable named ANDROID_SERIAL to know which device to use. If you're often using several devices in USB, you can just add the following aliases to your .bashrc file.
# ANDROID DEVICES SERIAL NUMBERS
alias adb-use-galaxy-nexus='export ANDROID_SERIAL=XXXBDAD913017009'
alias adb-use-moto-g='export ANDROID_SERIAL=XXX900AKC2'
alias reset-android-serial='unset ANDROID_SERIAL'
When using the adb logcat command, you can also set in the ANDROID_LOG_TAGS environment variable a list of tag/severity filter, like in the following example.
# suppresses all log messages except those with the tag "ActivityManager", at priority "Info" or above, and all log messages with tag "MyApp", with priority "Debug" or above
export ANDROID_LOG_TAGS="ActivityManager:I MyApp:D *:S"
These tips are fully compatible with the PidCat tool I talked about earlier.
Many apps exists to enforce good UI design in Android Apps, some embedded in the developper settings screen. This app is a small simple app that you can add to your toolbox.
As you can see on the screenshot above, the app draws a grid above your Android UI, to let you see if your views are aligned following the design guidelines.
The project is Open Sourced on Github and can be downloaded on the Google Play Store