Rabu, 04 Maret 2015

Fast Charger

Description

This app is automatic awaken when you plug in your charger , click start to speed up the charging process and at any level you can click exit to resume all the signals.
Is your device taking hours for being fully charged? Now you can fully charge your device in minutes with this amazing app.
When you click start , this app kills all the background processes and communications like wifi , blue tooth, Mobile internet which consume battery hence your charging is boosted . When you click exit , all the processes will auto resume.
Fast Charger provides half a charge in as little as 20 minutes.This app boosts your device's charging time upto 50%.
Now you can have a quick meal and have your device fully charged when you�re done.

Requires: Android2.3 or later
 
 
 

Read More..

T-Shirt Photo Suit For Men

Description

The T-Shirt Photo Suit For Men application will give a stylish T-Shirts for boys. You can wear virtual T-Shirts, just take photographs with a camera. You have front and back camera to take a picture. If you want to take a picture with front or back cam, click on the flip button in the below right side of corner button in the menu. You can edit your photo (Scale, Move and Rotate) suitable to T Shirt. Already have a pic it can choose from a gallery and edit the pic depends on a T Shirt. Save the picture after editing. You can try wide variety T Shirts and enjoy.
This application is absolutely free to download
Requires: Android2.3 or later
 
 
 
 
 
Read More..

Photo Animation Live wallpaper

Description

This amazing app is specially created for those who loves to display there photos on screen!
This Free app has various Premium Features:-
1. You can choose your favorite Photos and apply different animations.
2. Choose the photo of friend, family and lover.
3. Take a new photo from camera or choose photo from your mobile gallery
4. Select background from various HD background images
5. Can also choose background image from your mobile gallery
6. Choose the type of animation like rain, bubbles, snow, love etc,.
7. You can display single photo or multiple photo animation
Requires: Android2.3 or later
 
 
 
 
Read More..

App Memory SD Card Transfer

Description

App Memory SD Card Transfer can move apps to the SD card, help you easily to save phone memory to install more applications!
Supports the following features:
- Mobile Software List;
- Move one or all of the software to the sd card;
- A key to clear the software cache;
- Adding mobile software to ignore list;
- The size of the cached data display software;
- Show all available memory card size;
- Mobile software to the phone memory;
- Open this software in the market;
- Uninstall program;
- Open the program;
- Display software details.
You can APK (application) by the mobile phone memory to the SD card, but the system comes very handy mobile features, you need to find one by one, with the application after the transfer is much more convenient, it can help you through the system set to move the application to the internal or external storage, very convenient for your cell phone saves memory space, so that the mobile phone has become more fluid.
Requires: Android2.2 or later
 
 
 

Read More..

MX Player 1.7.37

Description

MX Player - The best way to enjoy your movies.
a) HARDWARE ACCELERATION - Hardware acceleration can be applied to more videos with the help of new H/W decoder.
b) MULTI-CORE DECODING - MX Player is the first Android video player which supports multi-core decoding. Test result proved that dual-core device�s performance is up to 70% better than single-core devices.
c) PINCH TO ZOOM, ZOOM AND PAN - Easily zoom in and out by pinching and swiping across the screen. Zoom and Pan is also available by option.
d) SUBTITLE GESTURES - Scroll forward/backward to move to next/previous text, Up/down to move text up and down, Zoom in/out to change text size.
e) KIDS LOCK - Keep your kids entertained without having to worry that they can make calls or touch other apps. (plugin required)
Subtitle formats:
- DVD, DVB, SSA/ASS Subtitle tracks.
- SubStation Alpha(.ssa/.ass) with full styling.
- SAMI(.smi) with ruby tag support.
- SubRip(.srt)
- MicroDVD(.sub)
- VobSub(.sub/.idx)
- SubViewer2.0(.sub)
- MPL2(.mpl)
- PowerDivX(.psb)
- TMPlayer(.txt)
- Teletext
- PJS(.pjs)
- WebVTT(.vtt)
******
About "Draw over other apps" permission: This permissions is required to block system keys when input blocking is activated on video playback screen.
******
If you are facing "package file is invalid" error, please install it again from product home page (
https://sites.google.com/site/mxvpen/download
)
******
If you have any questions, please visit XDA MX Player forum.
http://forum.xda-developers.com/apps/mx-player
Some of the screens are from the Elephants Dreams licensed under the Creative Commons Attribution 2.5.
(c) copyright 2006, Blender Foundation / Netherlands Media Art Institute / www.elephantsdream.org
Some of the screens are from the Big Buck Bunny licensed under the Creative Commons Attribution 3.0 Unported.
(c) copyright 2008, Blender Foundation / www.bigbuckbunny.org

Requires: Android2.3 or later
Download

Read More..

MP3 Player

Description

MP3 player is a must have music player for smart phones . Browse and play songs in your device faster with this user friendly designed application . You can also cut or edit mp3 songs using mp3 cutter tool . you can create or edit your own playlist more easily with this ultimate mp3 player .
Key Features :
- Plays OGG , WAV , AIFF , MIDI , AAC , MP3 ,OTA, MP2 , S3M , MOD , MTM , UMX , MP1 , XM , MO3 , M4A files
- 5 band graphic equalizer
- Browse and play your music by albums , artists , genres , songs , folders and playlists
- Play or shuffle by albums , artists , genres , songs , folders and playlists
- Built in mp3 cutter
- Sleep timer
- Create and edit playlist
- Lockscreen play
- 6 home screen widgets
- Music search
- Bass and treble equalizer adjustment
Disclaimer :
This app is based on vanilla code .
vanilla code:
https://github.com/kreed/vanilla
Copyright (C) 2012 Christopher
send your suggestions on
ddoztechnologies@gmail.com
Requires: Android2.3 or later



Read More..

WhatsApp Messenger

Description

WhatsApp Messenger is a smartphone messenger available for Android and other smartphones. WhatsApp uses your 3G or WiFi (when available) to message with friends and family. Switch from SMS to WhatsApp to send and receive messages, pictures, audio notes, and video messages. First year FREE! ($0.99 USD/year after)
WHY USE WHATSAPP:
? NO HIDDEN COST: Once you and your friends download the application, you can use it to chat as much as you want. Send a million messages a day to your friends for free! WhatsApp uses your Internet connection: 3G/EDGE or Wi-Fi when available.
? MULTIMEDIA: Send Video, Images, and Voice notes to your friends and contacts.
? GROUP CHAT: Enjoy group conversations with your contacts.
? NO INTERNATIONAL CHARGES: Just like there is no added cost to send an international email, there is no cost to send WhatsApp messages internationally. Chat with your friends all over the world as long as they have WhatsApp Messenger installed and avoid those pesky international SMS costs.
? SAY NO TO PINS AND USERNAMES: Why even bother having to remember yet another PIN or username? WhatsApp works with your phone number, just like SMS would, and integrates flawlessly with your existing phone address book.
? NO NEED TO LOG IN/OUT: No more confusion about getting logged off from another computer or device. With push notifications WhatsApp is ALWAYS ON and ALWAYS CONNECTED.
? NO NEED TO ADD BUDDIES: Your Address Book is used to automatically connect you with your contacts. Your contacts who already have WhatsApp Messenger will be automatically displayed.
? OFFLINE MESSAGES: Even if you miss your push notifications or turn off your phone, WhatsApp will save your messages offline until you retrieve them during the next application use.
? AND MUCH MORE: Share location, Exchange contacts, Custom wallpaper, Custom notification sounds, Landscape mode, Precise message time stamps, Email chat history, Broadcast messages and MMS to many contacts at once and much much more!
---------------------------------------------------------
We�re always excited to hear from you! If you have any feedback, questions, or concerns, please email us at:
android-support@whatsapp.com
or follow us on twitter:
http://twitter.com/WhatsApp
@WhatsApp
---------------------------------------------------------
When roaming, additional carrier data charges may apply. Please contact your carrier for details.

Requires: Android2.1 or later
Download
Read More..

Container Elevator Simulator 2

Description

Now we are releasing 3D simulator game wit coll graphics.
Feel what it takes to have the skills of a real elevator and excavator.
We are launching heavy construction elevator simulator which work as per demands.
This is best for kids games.
Disclaimer.
This game is ads supported according to "Google" ad policies.All sounds pictures assets in this game are the property of their respective owners.
in case of any objections, please tell us so we may act, rectify the issue .
only simulation has been performed using sound effects.
Requires: Android2.3 or later





Read More..

Caller Name Speaker

Description

Caller Name Speaker App lets you forget to see who is calling. This App will speak the name of the caller to give you hands free environment.
This app uses built in Android Text to speech engine to voice the caller name. So we recommend that it is pre-installed in your mobile. In your mobile Locate Voice input and output settings (under Setting menu) and check the Text-to-speech settings.
Following are the features of Caller Name Speaker app:
- Nice user interface. Simple to use. Only useful settings in the APP.
- Speak only the caller name (If phone number is not saved in your phone it will not speak. Reason for this is that Text-to-Speech engine is yet evolving and at times it does not speak the numbers properly)
- Change the Volume setting for Caller Name Speaker. Recommended volume setting is to sync with your Ringtone but you can customize it.
- Provide a Text before the Caller Name (For eg: HELLO)
- Provide a Text after the Caller Name (For eg: CALLING) {In this case final Text to speak will become HELLO <> CALLING}
- Change the Pitch (Default is NORMAL). Other available options are: NORMAL | LOW | HIGH
- Change the Speed (Default is NORMAL). Other available options are: NORMAL | SLOW | MEDIUM | FAST
- Delay (in sec): This will be the delay between the consecutive speaking of the caller name during the ringing of the phone.
All over Caller Name Speaker is a helpful app and it�s totally free!! It will help you to know who�s calling while you are driving or doing any other important work caller name speaker will speak caller name exactly it is in your phone book.
DOWNLOAD Caller Name SpeakerNOW FOR FREE!!!

Requires: Android2.3 or later





Read More..

Laser Flash Light

Description

Laser flash simulator is completely safe to use.
This free game is simple to use.
From there you can use this application to open an existing laser.
Characteristics of the laser flash light application:
- Ability ear is different laser colors
- Vibration feature and associated keys.
- Different laser light colors: green, red, blue
- Each pointer itself also has a different color.
Requires: Android3.0 or later





Read More..

Mobile Number Tracker

Description

Mobile Number Tracker shows you the CALLER LOCATION OFFLINE for all calls. It shows you the network
operator Name and Telecom Circle name with network operator image offline for incoming and outcoming calls.
Mobile Number Tracker also shows you the caller location on map. You can also block the unwanted
mobile number to receive further calls.
Key Features of Mobile Number Tracker----
Mobile caller Location: Shows caller location(Mobile Telecom Circle) for Mobile Number Offline
Call Block: Add unwanted number from contacts or manually to blocklist.
Call Logs: Shows the recent call history with operator name.
Contacts: Shows call contacts number with Telecom Operator name.
PIN/ZIP: Search any city/place PIN code.
STD/ISD Code: Search any STD/ISD Code.
MAP: You can see the mobile number location on map.

Requires: Android2.3 or later



Read More..

hotstar live TV movies cricket

Description

Watch the latest TV Shows, Movies and LIVE sports on your Android device completely free of charge! No sign up fees, or registration required. Access full-length episodes of your favourite shows, full-length Bollywood, English, Tamil, Kannada, Malayalam, Marathi and Bengali movies in addition to live cricket streaming.
Latest, full-length episodes: Catch full episodes of your favourite TV Shows across Comedy, Drama, Romance, Crime, Family Drama, Fantasy, Mythology, Reality and Teen Drama.
Latest Bollywood Blockbusters: We also update our Movie catalogue regularly with the biggest Bollywood blockbusters from Salman Khan, Ajay Devgan, Hrithik Roshan and others - all full length, available to stream for free!
Your Favourite Shows: On hotstar, you will find full episodes of your favourite current TV Shows from popular channels like Star Plus, Life OK, Channel V, Star Vijay, Asianet, Suvarna and others; serials like Diya Aur Baati Hum, Saathiya, Yeh Rishta Kya Kehlata Hai, Mahadev, Yeh Hai Mohabbatein, Dil Dosti Dance, Sadda Haq and Gumraah.
hotstar also has full episodes of your favourite TV Shows from the years gone by - Kyunki Saas Bhi Kabhi Bahu Thi, Kasautii Zindagi Ke, Sarabhai vs Sarabhai, Mahabharat, Khichdi, Iss Pyaar Ko Kya Naam Doon.
In addition, you can also catch the latest Tamil, Malayalam, Marathi & Bengali Shows here.
Shows of popular channels: Watch all TV shows, without sign up or registration from Star Plus, Life OK, Channel V, Asianet, Star Vijay, Star Jalsha, Star Pravah, Star One, Suvarna and Star World.
Blockbusters: hotstar is the only destination where you can catch full-length Bollywood movies from your favourite Stars with movies like Kick, Dabangg 2, Action Jackson, Finding Fanny, Singham, Singham Returns, Bang Bang, Bullett Raja, Golmaal, Fukrey, Kahaani etc.
Free streaming of English TV shows: hotstar will also showcase the best and the latest English shows for free! Now, you don�t need to illegally download your favourite English TV shows and watch them in inferior video quality. hotstar brings to you popular shows like Homeland, Modern Family, Prison Break, The Empire, The Americans and other shows, in HD quality and absolutely free! You can watch all the seasons and all the episodes of these shows on hotstar.
Languages Supported: Hindi, English, Malayalam, Tamil, Kannada, Marathi, Bengali.
Download*: hotstar allows you to download videos to your device so that you can watch it offline when network is limited, or on your commute to college/work. We know how precious your mobile data is, and we want to ensure that you get the most out of your mobile experience on hotstar.
Features: Free Streaming of TV Shows, Movies, Sports for free
Great video experience on any bandwidth - even on 2G!
Download & Go - View later when you are offline or network is poor.
Resume - hotstar will remember where you stopped watching and can pick up exactly at the point where you left off - across devices! Registration is required for this feature.
Playlist - Save content to your playlist so that you can watch in the order you like, where you have full control. Registration is required for this feature.
Rate/Curate content - let us know how much you liked a video that you saw - we will remember your choices and ensure you find videos similar to your tastes.
Note:
Our app is free, and has no charges or fees attached whatsoever. Registration is optional, but you will enjoy the experience as a registered user and the experience is still free!
Data charges applicable as per your internet/mobile operator when you stream/download content.

Requires: Android2.3.3 or later

Read More..

Teen Patti - Lucky Club

Description

Teen Patti ? Lucky Club is an online mobile game that you can live play with the real players around the world.
Main features of Teen Patti ? Lucky Club:
? New user will get initial funds of 8000 and splendid daily bonus everyday.
? You will get additional huge amount of coins while you keep playing in more than 7days.
? Tired of playing with strangers? Facebook user can invite and play with Facebook friends, it will be much more fun.
? Our tiny install package will save your internet cost and phone storage space, and it works excellent on poor internet connection.
? Amusing emoticons and chat board make interactive smooth and funny.
? You can join different teen patti online matches to win the hugely rewards, more exciting, competitive and profitable.
? Easy to use, fast response and low network flow. You can even play Teen Patti without internet.
Teen Patti ? Lucky Club is a free multi-player live online poker game that you can play as a Facebook player or a guest player, meanwhile you can still play offline games without internet. If you logged in as a Facebook player, you can invite your friends to your table and play with them. Besides the poker game, you can also interactive with your friends such as exchanging gifts, chatting and sending emoticons.
Teen Patti ? Lucky Club costs low phone storage space and network flow, it helps save money on your mobile phone bill.
Teen Patti ? Lucky Club is completely free. It gives you huge daily bonus and many other ways to get free chips. No need to worry about your money.
Teen Patti ? Lucky Club holds a lot of highly profitable matches everyday. From 10AM to 10PM, there is a match in each hour. Winners of match will get different kind of awards according to their rank. Top winners of the match will get significant awards such as LAPTOP, SMART PHONE, DIGITAL CAMERA and so on.
Please Note: In the Teen Patti ? Lucky Club game you win or lose chips which have no real cash value. The game does not involve real gambling.

Requires: Android2.3.3 or later
 
 
 
 

Read More..

ETheme Launcher - Boost&Lock

ETheme Launcher
2000+ themes, wallpapers, fonts to customize your android. Boost, utility ...
ETHEME LAUNCHER
Not the best, but you must get!
Highlights:
? 3S: Simple � Slight � Stylish
? 2000+ styles (theme & wallpaper) to beautify your phone
? 2MB to own the most marvelous wallpapers
? 2 touches to possess a unique theme
? 2.2 and higher Android version support
? 0.2s to speed up your device
?
FREE
theme & wallpaper weekly- update
Features:
?
Flat design
: flat UI and UX design makes your home screen elegant and pro.
?
Theme & wallpaper
: 2.000+ FREE theme & wallpaper in various subjects: Landscapes, characters, manga, art, movies�
Applying themes with eTheme is easy as pie!
?
Font
: 200+ creative fonts to freely mix and match.
?
Prior Apps
: automatically put primary apps on workspace that you can easily find it for faster app starting
?
Smart Folder
: similar apps are sorted into the same folder: Social, Media, Photo, Lifestyle, Google, etc. in the first- time operation.
?
Widget
: essential tools to meet everyday needs such as: clock-weather, utility bar (Wi-Fi, brightness, flashlight, etc.)
?
Lock Screen
: A simple and stylish design allowing users to unlock their devices just like that of IOS, as well as optionally prevent anyone from accessing their phones without permission by running security pin.
We are young and enthusiastic developers fascinated to chasing our dream- constituting a smart launcher not only to customize your phone but also to fulfill everyone�s needs. We will never back down from challenges to pursue these objectives!
We'll keep you updated every second, so stay tuned!
Website:
Requires: Android4.1 or later
Read More..

Twin Photo Frames

Description

Make reflective 2D and 3D Photo mirrors effects for your photos. Mirror photo is just a stunning reflection.
- Select a photo from gallery or take a picture using camera.
- Select the frame or shape that you want to have for this twin camera reflection.
- Apply multiple overlay effects as well.
- Make mirror images in seconds.
- Turn your camera into real magic mirror.
- Save and share instantly on Instagram, Facebook, Twitter, Flickr and other social media platforms.
Any feedback is appreciated.
Requires: Android2.3 or later
 
 
 
 
 
Read More..

RAM Cleaner Booster 360

RAM Cleaner Booster 360 is one of the most powerful and comprehensive management tools to improve your android phone's performance. It speeds up your phone's running speed and saves battery.
RAM Cleaner Booster 360 is a Memory Optimizer; it's a smart memory management application that will keep your phone running better, faster, and longer. RAM Booster allows you to instantly free up memory when your phone slows down.
ou can boost your RAM with single touch. Touch 'Clean' button and clear running process. In Tasks tab you can swipe to clean individual process from ram memory. In more tab you also know about your internal and external memory status.
1. Totally FREE
. Enhance your OS performance
. Increasing the amount of Memory available.
. Recovers Memory leaks from unstable applications.
. Clearing cache
. Check your available memory
. Clean unused process
Requires: Android2.3 or later



Read More..

Minggu, 22 Februari 2015

Sending Messages to Android Auto

    In November of 2014, Google provided developers with two simulators, one for media apps and another for message notifications, to start updating and testing apps to work with the new Android Auto platform. In a previous post, I shared how to create a service that works with Android Auto in order to play media, and in this post I will go over how to interact with and send messages to the Android Auto notification screen. All source code for this tutorial can be found on GitHub. The previous post (linked above) has instructions for installing the Auto simulators, so I'm going to skip over that in this post for brevity.

Main message screen on Android Auto
    To start, we're going to want to get everything set up. We'll do this by first making sure our app is targeting SDK version 21 or higher in build.gradle. Next we'll move over to adding in a new xml file under /res/xml called automotive_app_desc.xml and add in the following content to let Android Auto know that this app supports notifications
<automotiveApp>
<uses name="notification"/>
</automotiveApp>
    Next we're going to want to go into AndroidManifest.xml and add a metadata tag within the application node to direct the OS towards our previously created xml file.
<meta-data android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" />
    In addition to our metadata tag, we're going to add two broadcast receivers with intent-filters that look for specific actions for 'read' or 'reply' user actions. While I'm using broadcast receivers here, it should be noted that you could also create Services to handle the read and reply situations instead, which I'll talk about a little more when we start tying in these broadcast receivers in code.
<receiver android:name=".AutoMessageReadReceiver" android:exported="false">
<intent-filter>
<action android:name="com.ptrprograms.androidautomessenger.ACTION_MESSAGE_READ"/>
</intent-filter>
</receiver>

<receiver android:name=".AutoMessageReplyReceiver" android:exported="false">
<intent-filter>
<action android:name="com.ptrprograms.androidautomessenger.ACTION_MESSAGE_REPLY"/>
</intent-filter>
</receiver>
    Now that the general setup is done, we can jump into our Java code. The way Android Auto's messaging system works is an Android application connected to Auto runs all of the logic for when a notification should be constructed, then it sends that notification to the Auto dashboard. To keep things simple, I'm going to build out the notification in our application's MainActivity.java file in order to point out what needs to be done. The first part of this should seem familiar if you've dealt with Android notifications before (and if not, I've written other posts on creating notifications): we're going to create a general NotificationCompat.Builder object.
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder( getApplicationContext() )
.setSmallIcon( R.drawable.ic_launcher )
.setLargeIcon( BitmapFactory.decodeResource( getResources(), R.drawable.ic_launcher ) )
.setContentText( "content text" )
.setWhen( Calendar.getInstance().get( Calendar.SECOND ) )
.setContentTitle( "content title" );
    With the NotificationCompat.Builder created, we can start adding in the Android Auto portions of the code. To do this, we need to use the .extend() method of NotificationCompat.Builder to add functionality from NotificationCompat.CarExtender(), which also uses a builder pattern to add functionality to our app (more options are available than shown here, such as setting text color for the Auto notification, but I'll leave that off for now). Each message group on the Auto dashboard is called a Conversation, so we also need to create an UnreadConversation to add to our notification.
notificationBuilder.extend( new NotificationCompat.CarExtender()
.setUnreadConversation( getUnreadConversation() ) );
   getUnreadConversation() handles creating the messages that we will display, the actions taken when the user has read them and if they reply
private NotificationCompat.CarExtender.UnreadConversation getUnreadConversation() {
NotificationCompat.CarExtender.UnreadConversation.Builder unreadConversationBuilder =
new NotificationCompat.CarExtender.UnreadConversation.Builder( UNREAD_CONVERSATION_BUILDER_NAME );

unreadConversationBuilder
.setReadPendingIntent( getMessageReadPendingIntent() )
.setReplyAction( getMessageReplyPendingIntent(), getVoiceReplyRemoteInput() )
.addMessage( "Message 1")
.addMessage( "Message 2" )
.addMessage( "Message 3" )
.setLatestTimestamp( Calendar.getInstance().get( Calendar.SECOND ) );

return unreadConversationBuilder.build();
}
    The important things to pay attention to here are getMessageReadPendingIntent(), getMessageReplyPendingIntent() and getVoiceReplyRemoteInput(). As mentioned before, I'm using a set of BroadcastReceivers to handle responding to when the user reads or replies to a message, but since we're using a system of PendingIntents here, we could just as easily create a set of intents that go to a service to deal with these actions. getMessageReadPendingIntent() is pretty straight forward, creating a pending intent with an action that will be caught by AutoMessageReadReceiver.java after the user has tapped on the message and it has been read aloud by the system.
private Intent getMessageReadIntent() {
return new Intent()
.addFlags( Intent.FLAG_INCLUDE_STOPPED_PACKAGES )
.setAction( MESSAGE_READ_ACTION )
.putExtra( MESSAGE_CONVERSATION_ID_KEY, 1 );
}

private PendingIntent getMessageReadPendingIntent() {
return PendingIntent.getBroadcast( getApplicationContext(),
1,
getMessageReadIntent(),
PendingIntent.FLAG_UPDATE_CURRENT );
}
    AutoMessageReadReceiver simply listens for our intent with the MESSAGE_READ_ACTION and dismisses the notification associated with the intent.
public class AutoMessageReadReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
int conversationId = intent.getIntExtra( MainActivity.MESSAGE_CONVERSATION_ID_KEY, -1 );
Log.d( "Message", "id: " + conversationId );
NotificationManagerCompat.from( context ).cancel( conversationId );
}
}
Messages before they have been listened to
Message notification after all 'UnreadConversations' have been read
    The reply action is a little more interesting, though equally straight forward. We create another PendingIntent for a separate BroadcastReceiver, and also attach a RemoteInput for a voice reply with the setReplyAction method of our UnreadConversationBuilder.
private Intent getMessageReplyIntent() {
return new Intent()
.addFlags( Intent.FLAG_INCLUDE_STOPPED_PACKAGES )
.setAction( MESSAGE_REPLY_ACTION )
.putExtra( MESSAGE_CONVERSATION_ID_KEY, 1 );
}

private PendingIntent getMessageReplyPendingIntent() {
return PendingIntent.getBroadcast( getApplicationContext(),
1,
getMessageReplyIntent(),
PendingIntent.FLAG_UPDATE_CURRENT );
}

private RemoteInput getVoiceReplyRemoteInput() {
return new RemoteInput.Builder( VOICE_REPLY_KEY )
.setLabel( "Reply" )
.build();
}
    where our BroadcastReceiver, AutoMessageReplyReceiver.java, not only marks a message as read, but will also extract a voice reply provided by the user in order to use it within our app.
public class AutoMessageReplyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Toast.makeText( context, "Message Received", Toast.LENGTH_LONG ).show();

int conversationId = intent.getIntExtra( MainActivity.MESSAGE_CONVERSATION_ID_KEY, -1 );
Log.d( "Message", "id: " + conversationId );
NotificationManagerCompat.from(context).cancel( conversationId );

String message = getMessageFromIntent( intent );
}

private String getMessageFromIntent( Intent intent ) {
//Note that Android Auto does not currently allow voice responses in their simulator
Bundle remoteInput = RemoteInput.getResultsFromIntent( intent );
if( remoteInput != null && remoteInput.containsKey( "extra_voice_reply" ) ) {
return remoteInput.getCharSequence( "extra_voice_reply" ).toString();
}

return null;
}
}
Reply button pressed. Currently the Android Auto simulator does not allow for voice responses, so it sends an empty string value with the RemoteInput and posts a Toast with "Canned response sent".
    Once the notification is properly set up for displaying on Auto, we use NotificationManagerCompat to display it on our device and Auto from MainActivity.java
NotificationManagerCompat.from( this ).notify( 1, notificationBuilder.build() );
    Once the notification has been sent, it will be visible to the user on the Android Auto dashboard. While this system may be simple to work with, given a proper location or context aware app, it could be an invaluable feature for users as they travel. While there are still a few things missing from the official documentation that I'd like to see, such as how to hide the reply button, I'm definitely excited to see what else becomes available as Auto is released and matures, and hope this tutorial helps others create great apps.

Read More..

Senin, 16 Februari 2015

Using the Android Auto Media Browser

    During the 2014 I/O, Google made the announcement that Android would be available for in-vehicle systems, but left everyone hanging on the major details. Luckily, in November 2014 they released two simulator APKs for developers to begin testing different features of their apps for Android Auto: audio and messaging services. For this tutorial, I will go over using the Android Auto framework to browse media and create a simple media player (which can obviously be expanded on for a real application). Source code for this tutorial can be found on GitHub.

   In order to start, we'll first need to install the Media Browser Simulator APK for Android Auto onto a Lollipop device. I ended up using a 2013 Nexus 7, though a Lollipop emulator should also work for our purposes. This can be found under your Android SDK folder along the path /extras/google/simulators/media-browser-simulator.apk after installing Android Auto API Simulators from the SDK Manger. You can install this through the Android Device Bridge (ADB) with the following command:
adb install media-browser-simulator.apk
    Once this is loaded up, we should be able to open the application on our device to see a screen similar to this (minus the AndroidAutoMedia item that we'll build through this tutorial):


    Next we'll want to get going on our actual app. We'll start by creating an app in Android Studio for phone/tablet. Once that's done and we have our standard "Hello World" template together, we'll need to go under /res/xml and create a new xml file - under my source code it's called automotive_app_desc.xml, though you can call it whatever you'd like. This file will be used by our application to let Android Auto know that we're building components to work with it. For now, simply copy the following source code into the XML file that tells Android Auto that we're making a media Auto plugin.
<automotiveApp>
<uses name="media" />
</automotiveApp>
    With our XML file created, we'll move over and open AndroidManifest.xml to make a few additions to work with Auto. Within the application tag, we're going to want to add two meta-data items - one points to the XML file we just created, and the other provides the Android Auto launcher icon used in the media browser shown above (I just used the standard ic_launcher.png).
<meta-data android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc"/>

<meta-data android:name="com.google.android.gms.car.notification.SmallIcon"
android:resource="@drawable/ic_launcher" />
    After the meta-data nodes are made, we'll want to add a new Service node to the manifest, and include an intent-filter for "android.media.browse.MediaBrowserService."
<service android:name="com.ptrprograms.androidautomedia.service.AutoMediaBrowserService">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService" />
</intent-filter>
</service>
    Now that the manifest is filled out, we can start working on our Java code. We'll create a service (I called mine AutoMediaBrowserService, as seen above) and extend the MediaBrowserService class provided in the SDK. There are two methods that we will want to override here in order to get started. The first is onGetRoot( String clientPackageName, int clientUid, Bundle rootHints ), which is called by the Auto media browser application when first interacting with our service. In this method, we're only going to add one line to return a new BrowserRoot object using our root identifier string (I've defined mine at the top of the class as a final variable of BROWSEABLE_ROOT), though you can also use this method to validate the calling package to verify that it should have access to your media assets and return null if it fails validation.
@Override
public BrowserRoot onGetRoot(String clientPackageName, int clientUid, Bundle rootHints) {
return new BrowserRoot(BROWSEABLE_ROOT, null);
}
    The other method that we'll need to override is onLoadChildren(String parentId, Result<List<MediaBrowser.MediaItem>> result). This method is called when the root item or any subsequent items are clicked on in the Android Auto media browser. This is where you will check the parentId parameter and build out the list of MediaBrowser.MediaItems based on that id in order to provide a file structure for your app. In order to simplify things, I've moved this logic into a separate method so that onLoadChildren() is easily digestible.
@Override
public void onLoadChildren(String parentId, Result<List<MediaBrowser.MediaItem>> result) {

List<MediaBrowser.MediaItem> items = getMediaItemsById( parentId );
if( items != null ) {
result.sendResult( items );
}

}
    Now before I go into explaining how getMediaItemsById() works for providing media items and folders, I need to go over a bit of the prep code that I placed into onCreate() for this service. I created a model object called Song that consists of general information about the media object, such as artist, title, genre, etc. and a quick generator class to create the media objects that will be used for this sample. How you create and work with your own media objects will depend on your implementation and applications, so I tried to keep mine as simple as possible The Song model object source can be found here, and the generator helper class can be found here. With that in mind, my onCreate() looks like this
 @Override
public void onCreate() {
super.onCreate();

mSongs = SongGenerator.generateSongs();

initMediaSession();
}
    where initMediaSession simply builds out the MediaSession and Token used for this sample:
private void initMediaSession() {
mMediaSession = new MediaSession( this, "Android Auto Audio Demo" );
mMediaSession.setActive( true );
mMediaSession.setCallback( mMediaSessionCallback );

mMediaSessionToken = mMediaSession.getSessionToken();
setSessionToken( mMediaSessionToken );
}
    With this foundation in mind, we can move over to looking at getMediaItemsById(). This method will take an id, either our root id or one associated with a clicked item in the Auto browser, and create a folder or file structure to display to the user.
 private List<MediaBrowser.MediaItem> getMediaItemsById( String id ) {
List<MediaBrowser.MediaItem> mediaItems = new ArrayList<MediaBrowser.MediaItem>();
if( BROWSEABLE_ROOT.equalsIgnoreCase( id ) ) {
mediaItems.add( generateBrowseableMediaItemByGenre(BROWSEABLE_CAJUN) );
mediaItems.add( generateBrowseableMediaItemByGenre(BROWSEABLE_JAZZ) );
mediaItems.add( generateBrowseableMediaItemByGenre(BROWSEABLE_ROCK) );
} else if( !TextUtils.isEmpty( id ) ) {
return getPlayableMediaItemsByGenre( id );
}

return mediaItems;
}
    As you can see, if BROWSEABLE_ROOT is the clicked item, we create three media items with the method generateBrowseableMediaItemByGenre() and pass in one of three strings defined at the top of the class, and then return those items as part of our MediaItems list. generateBrowseableMediaItemByGenre() simply creates a MediaItem with the FLAG_BROWSEABLE flag set and some basic information to define the folders, as shown here:
private MediaBrowser.MediaItem generateBrowseableMediaItemByGenre( String genre ) {
MediaDescription.Builder mediaDescriptionBuilder = new MediaDescription.Builder();
mediaDescriptionBuilder.setMediaId( genre );
mediaDescriptionBuilder.setTitle( genre );
mediaDescriptionBuilder.setIconBitmap( BitmapFactory.decodeResource( getResources(), R.drawable.folder ) );

return new MediaBrowser.MediaItem( mediaDescriptionBuilder.build(), MediaBrowser.MediaItem.FLAG_BROWSABLE );
}
    This will provide us with three folders for three different genres under our root structure, like so


    When one of these three folders is tapped on by a user, we return to onLoadChildren(), which in turn calls getMediaItemsById() again, but this getMediaItemsById() will have an id that is not our root folder, so getPlayableMediaItemsByGenre( String genre ) is called. This will loop through all of our songs and create a list of MediaItems based on the passed genre
private List<MediaBrowser.MediaItem> getPlayableMediaItemsByGenre( String genre ) {
if( TextUtils.isEmpty( genre ) )
return null;

List<MediaBrowser.MediaItem> mediaItems = new ArrayList();

for( Song song : mSongs ) {
if( !TextUtils.isEmpty( song.getGenre() ) && genre.equalsIgnoreCase( song.getGenre() ) ) {
mediaItems.add( generatePlayableMediaItem( song ) );
}
}
return mediaItems;
}
    where generatePlayableMediaItem( song ) creates a MediaItem with properties based on the song and the FLAG_PLAYABLE flag set
private MediaBrowser.MediaItem generatePlayableMediaItem( Song song ) {
if( song == null )
return null;

MediaDescription.Builder mediaDescriptionBuilder = new MediaDescription.Builder();
mediaDescriptionBuilder.setMediaId( song.getuId() );

if( !TextUtils.isEmpty( song.getTitle() ) )
mediaDescriptionBuilder.setTitle( song.getTitle() );

if( !TextUtils.isEmpty( song.getArtist() ) )
mediaDescriptionBuilder.setSubtitle( song.getArtist() );

if( !TextUtils.isEmpty( song.getThumbnailUrl() ) )
mediaDescriptionBuilder.setIconUri( Uri.parse( song.getThumbnailUrl() ) );

return new MediaBrowser.MediaItem( mediaDescriptionBuilder.build(), MediaBrowser.MediaItem.FLAG_PLAYABLE );
}
    At this point we should be able to click through the Auto browser to get to a screen similar to this:



    Now if you remember, back in initMediaSession() we had this line:
mMediaSession.setCallback( mMediaSessionCallback );
    mMediaSessionCallback is defined at the top of our class and is meant to handle actions from the buttons available in the Auto media player. This is where we start and stop our media, define which controls are available and set the metadata for our media that will be displayed by Android Auto.
private MediaSession.Callback mMediaSessionCallback = new MediaSession.Callback() {
@Override
public void onPlay() {
super.onPlay();

toggleMediaPlaybackState( true );
playMedia( PreferenceManager.getDefaultSharedPreferences( getApplicationContext() ).getInt( CURRENT_MEDIA_POSITION, 0 ), null );
}

//This is called when the pause button is pressed, or when onPlayFromMediaId is called in
//order to pause any currently playing media
@Override
public void onPause() {
super.onPause();

toggleMediaPlaybackState( false );
pauseMedia();
}

@Override
public void onPlayFromMediaId(String mediaId, Bundle extras) {
super.onPlayFromMediaId(mediaId, extras);

initMediaMetaData( mediaId );
toggleMediaPlaybackState( true );
playMedia( 0, mediaId );
}
};
    As you can see, I have a few helper methods here that I'll go over next. onPlayFromMediaId( String mediaId, Bundle extras ) is the callback that the system uses when a MediaItem with the FLAG_PLAYABLE property is clicked. In this callback we first set up our metadata for displaying information about the MediaItem with initMediaMetaData()
private void initMediaMetaData( String id ) {

for( Song song : mSongs ) {
if( !TextUtils.isEmpty( song.getuId() ) && song.getuId().equalsIgnoreCase( id ) ) {
MediaMetadata.Builder builder = new MediaMetadata.Builder();

if( !TextUtils.isEmpty( song.getTitle() ) )
builder.putText( MediaMetadata.METADATA_KEY_TITLE, song.getTitle() );

if( !TextUtils.isEmpty( song.getArtist() ) )
builder.putText( MediaMetadata.METADATA_KEY_ARTIST, song.getArtist() );

if( !TextUtils.isEmpty( song.getGenre() ) )
builder.putText( MediaMetadata.METADATA_KEY_GENRE, song.getGenre() );

if( !TextUtils.isEmpty( song.getAlbum() ) )
builder.putText( MediaMetadata.METADATA_KEY_ALBUM, song.getAlbum() );

if( !TextUtils.isEmpty( song.getAlbumUrl() ) )
builder.putText( MediaMetadata.METADATA_KEY_ALBUM_ART_URI, song.getAlbumUrl() );

mMediaSession.setMetadata( builder.build() );
}
}
}
     Then we toggle our MediaState and set our controls with toggleMediaPlaybackState(). Note that the controls are set using setAction on our PlaybackState.Builder() by bitwise ORing our actions, so when our media is playing we'll display the Pause, Skip to Next and Skip to Previous, and when our media is paused we'll only display the Play button.
private void toggleMediaPlaybackState( boolean playing ) {
PlaybackState playbackState;
if( playing ) {
playbackState = new PlaybackState.Builder()
.setActions( PlaybackState.ACTION_PLAY_PAUSE | PlaybackState.ACTION_SKIP_TO_NEXT | PlaybackState.ACTION_SKIP_TO_PREVIOUS )
.setState( PlaybackState.STATE_PLAYING, 0, 1 )
.build();
} else {
playbackState = new PlaybackState.Builder()
.setActions( PlaybackState.ACTION_PLAY_PAUSE )
.setState(PlaybackState.STATE_PAUSED, 0, 1)
.build();
}

mMediaSession.setPlaybackState( playbackState );
}
 


        The final methods in our service simply control starting, pausing and resuming our media. For this sample I only have one MP3 available to keep things simple, though you can set what plays based on the media id passed to the callback methods. The MP3 I'm using here was provided by a good friend of mine, Geoff Ledak, who you can catch DJing online at AfterHoursDJs.org.
private void playMedia( int position, String id ) {
if( mMediaPlayer != null )
mMediaPlayer.reset();

//Should check id to determine what to play in a real app
int songId = getApplicationContext().getResources().getIdentifier("geoff_ledak_dust_array_preview", "raw", getApplicationContext().getPackageName());
mMediaPlayer = MediaPlayer.create(getApplicationContext(), songId);

if( position > 0 )
mMediaPlayer.seekTo( position );
mMediaPlayer.start();

}

private void pauseMedia() {
if( mMediaPlayer != null ) {
mMediaPlayer.pause();
PreferenceManager.getDefaultSharedPreferences( this ).edit().putInt( CURRENT_MEDIA_POSITION,
mMediaPlayer.getCurrentPosition() ).commit();
}
}

@Override
public void onDestroy() {
super.onDestroy();
if( mMediaPlayer != null ) {
pauseMedia();
mMediaPlayer.release();
PreferenceManager.getDefaultSharedPreferences( this ).edit().putInt( CURRENT_MEDIA_POSITION,
0 ).commit();
}

}
    One more thing we can do is add a colorAccent to our app theme in order to add a bit of personalization to fit our app under /res/values-v21
<style name="AppTheme" parent="android:Theme.Material.Light">
<item name="android:colorAccent">@android:color/holo_green_dark</item>
</style>
    And with that, we should have a working Android Auto browser service plugin. I hope you've enjoyed the tutorial, and good luck building your own implementations for this new platform!
Read More..

Minggu, 25 Januari 2015

Implementing and Using Custom Drawable States

    One of the things that Android comes with out of the box is pressed states, which allows colors and drawables to change what's displayed on a view based on whether or not a user is pressing down on that view. In this post I'm going to take that a step further and go over a simple example for how to implement custom drawable states that allow you to tailor your user experience based on data. All code for this post can be found on GitHub.

    To keep things simple, the first class we're going to define is an enum containing the expected states that we want to work with. In this case we're going to use a traffic signal set of "Go", "Slow Down" and "Stop".

public enum CustomState {
GO,
SLOW_DOWN,
STOP
}

    Next we're going to want to create an 'attrs.xml' file to store the attributes that we'll use for our states

<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="state_go" format="boolean" />
<attr name="state_slow_down" format="boolean" />
<attr name="state_stop" format="boolean" />
</resources>

    Once our attributes are defined, we're going to move to where the magic happens: our custom View (CustomDrawableTextView.java, in this example). The first thing we're going to do is add a set of int arrays that represent each state that we want to support as member variables. These int arrays are going to be used later to merge in with our drawable states. We're also going to want to create a variable to keep track of which state is currently active from our custom enum.

 protected static int[] STATE_GO = { R.attr.state_go };
protected static int[] STATE_SLOW_DOWN = { R.attr.state_slow_down };
protected static int[] STATE_STOP = { R.attr.state_stop };

private CustomState mState;

    In order to drive this view, I've added an update method that is manually called on a timer from MainActivity, though this View could just as easily be built to use an event bus or other technique to drive the data. The key thing to notice is that the new desired state is passed to and saved by the View, and refreshDrawableState() is called.

 public void update( CustomState state ) {

if( state != null )
mState = state;

if( CustomState.GO.equals( mState ) ) {
setText( "GO" );
} else if( CustomState.SLOW_DOWN.equals( mState ) ) {
setText( "SLOW DOWN" );
} else if( CustomState.STOP.equals( mState) ) {
setText( "STOP" );
}

refreshDrawableState();
}

    The final thing we need to do with our custom View is override onCreateDrawableState to add in our custom state attributes. We do this by saving the result of the super method with an incremented parameter passed to it, and then calling mergeDrawableStates with the result and our int array attribute to add our custom attribute to the active drawable states for our View.

 @Override
protected int[] onCreateDrawableState(int extraSpace) {
if( mState == null )
return super.onCreateDrawableState(extraSpace);

final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);

if( CustomState.GO.equals( mState ) ) {
mergeDrawableStates( drawableState, STATE_GO );
return drawableState;
} else if( CustomState.SLOW_DOWN.equals( mState ) ) {
mergeDrawableStates( drawableState, STATE_SLOW_DOWN );
return drawableState;
} else if( CustomState.STOP.equals( mState) ) {
mergeDrawableStates( drawableState, STATE_STOP );
return drawableState;
} else {
return super.onCreateDrawableState(extraSpace);
}
}

    Now that that's all set, let's define a new drawable selector file to take advantage of our custom drawable states

<selector
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:customapp="http://schemas.android.com/apk/res-auto">
<item customapp:state_go="true" android:drawable="@android:color/holo_green_light" />
<item customapp:state_slow_down="true" android:drawable="@color/yellow" />
<item customapp:state_stop="true" android:drawable="@android:color/holo_red_light" />
<item android:drawable="@android:color/white" />
</selector>

    Notice the custom attributes of state_go, state_slow_down and state_stop that match our attrs.xml file and our custom int arrays from our view. Android will automatically handle displaying the proper color for this state drawable now that we've laid out the groundwork for it. Finally we'll assign this drawable as a background for our custom View, and we'll see the color change as our states change.

 <com.ptrprograms.customdrawablestates.CustomDrawableTextView
android:id="@+id/custom_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="40sp"
android:gravity="center"
android:text="@string/hello_world"
android:background="@drawable/custom_state_background"/>





Read More..