Posts

Wireless Android Auto for Non-Google phones

Image
Wireless Android Auto works on Non-Google phones with new UI after updating Google play service beta version. Before that We should know What Android Auto does ? Ans: Android Auto(AA) is a projection technique that takes the things that you want to do with your android phone while driving and puts them on your car's built-in display. When you connect your Android phone to AA, you can get turn-by-turn directions, make calls, send and receive messages, listen to music, and more... AA uses the contacts on your phone to help you make calls, send texts, and find destinations. AA uses Voice Control, so you can ask for what you want while you are driving. Allowing you to stay focused on the road. AA even works with the built-in controls in your car like a touchscreen, knob, or steering wheel buttons. As of today only Pixel and Nexus phones are supporting wireless Android Auto in Car projection. In case of CarPlay most of the iPhone are supporting wireless CarPlay. As per below ...

Use of Shared Preferences in Android

Image
For Data Storage Android provides number of ways . Shared Preferences is one of them. We can save primitive data in key-value pairs and reuse it across multiple Activities. The SharedPreferences class provides a general framework that allows to save and retrieve persistent key-value pairs of primitive data types. This data exists even the Application is killed. Steps: 1) To get the Object of SharedPreferences use :   SharedPreferences sharedPrefs = this.getSharedPreferences("newPrefs",MODE_WORLD_READABLE);  In getSharedPreferences() just put the file name and the mode. 2)To write some data use :         SharedPreferences.Editor prefsEditor = sharedPrefs.edit(); 3)Simple put the data :         prefsEditor.putString(MY_NAME, "Subrat Mohanty");         prefsEditor.putString(MY_ID, "E3141");         prefsEditor.putBoolean(MY_STATUS, true); 4)Commi...

Extracting Java class from .apk files in Android

Extracting Java class from .apk files is a few step work as follows: Need : dex2jar and Java Decompiler Step: 1- Extract .apk(HelloAndroid.apk) file and got the folder (HelloAAndroid). In this folder there is a "classes.dex" 2- Get the tool dex2jar - A tool for converting Android's .dex format to Java's .class format. 3- Extract that there is bat file named as "dex2jar". 4- Open the command prompt(for windows). Goto the extracted dex2jar folder and do this > dex2jar.bat <classes.dex> Like this: > dex2jar.bat "C:\Documents and Settings\subrat_m\My Documents\HelloAndroid\classes.dex" This is done with a "Done" message. 5- Then there is Executable jar file is created as " classes_dex2jar " . Just extract this file  and you can find all the " .class " files. 6- Use any  Java Decompiler  to convert the .class files into .java files. Happy coding ....

Creat Emulator in Android 4.0

Image
Android 4.0 SDK already released.  I have updated my Eclipse and install the needed plugins. But while creating the Emulator it gives a error as " Unable to find a 'userdata.img' file for ABI armeabi to copy into the AVD folder. " This can be solved by updating the System images as below: 1. Open Eclipse and open the "Open SDK Manager". 2. Check "Android 4.0" and select " ARM EABI v7a System Image " 3. Install that package . After instalation , a  xxx\Android SDK\Android SDK\system-images\android-14\ armeabi-v7a folder created with " userdata.img ". Then again create the Emulator with Android 4.0 . Now it will create sucessfully. Happy Coding. Enjoy the new Android ICS UI