Monthly archives: December, 2016

Android Notifications

A notification is a message on the status bar. Unlike a toast, a notification is persistent and will keep showing until it is closed or the device is shut down. A notification is an instance of android.app.Notification. The most convenient way to create a notification is by using a nested class called Builder, which can …

Android AlertDialog

AlertDialog is a window that provides feedback to the user. Unlike a Toast that fades by itself, however, an AlertDialog shows indefinitely until it loses focus. In addition, an AlertDialog can contain up to three buttons and a list of selectable items. A button added to an AlertDialog can be connected to a listener that gets …

Android APK File

An Android application is packaged into an apk file, which is basically a zip file and can be opened using WinZip or a similar program. All applications are signed with a private key. This process sounds hard enough, but thankfully Android Studio takes care of everything. When you run an Android application from inside Android …

Android Manifest file

Every Android application must have a manifest file called AndroidManifest.xml file that describes the application. A sample manifest <?xml version=“1.0” encoding=“utf-8”?> <manifest xmlns:android=“http://schemas.android.com/apk/res/android” package=“com.example.firstapp” > <application android:allowBackup=“true” android:icon=”@drawable/ic_launcher” android:label=”@string/app_name” android:theme=”@style/AppTheme” > <activity android:name=“com.example.firstapp.MainActivity” android:label=”@string/app_name” > <intent-filter> <action android:name=“android.intent.action.MAIN” /> <category android:name=“android.intent.category.LAUNCHER” /> </intent-filter> </activity> </application> </manifest> A manifest file is an XML document with manifest as …

Providing Audio Playback for Auto in Android

Drivers want to access their music and other audio content on the road. Audio books, podcasts, sports commentary, and recorded talks can make a long trip educational, inspirational, and enjoyable. The Android framework allows you to extend your audio app so users can listen to their favorite tunes and audio content using a simple, yet …

Getting Started with Auto on Android

Android Auto extends the Android platform into the car. When users connect their handheld devices running Android 5.0 or higher to a compatible vehicle, the Auto user interface provides a car-optimized Android experience on the vehicle’s screen. Users interact with compatible apps and services through voice actions and the vehicle’s input controls (like a touchscreen …

Testing Apps for Auto in Android

Testing your Auto app ensures that users do not encounter unexpected results or have a poor experience when interacting with your apps. Android now provides Desktop Head Unit (DHU), a testing tool for Auto apps that lets you test pre-released versions of your Android Auto apps without having to work from your car. The Desktop …