Saturday, January 4, 2014

Using custom fonts in Android

In Android their is support for adding custom fonts using Typeface in java file.

But it would be more helpful if Typeface can set in XML file just like setting default android fonts android:typeface="sans"

So first of all i assigned all the fonts prefixed with numbers

Then have a look at this code snippet

Wednesday, December 25, 2013

Creating Data Base tables in Android programatically

For me SQlite syntax is quite confusing  and difficult job . For creating below String

private static final String CREATE_TABLE_TODO = "CREATE TABLE "
            + TABLE_TODO + "(" + KEY_ID + " INTEGER PRIMARY KEY," + KEY_TODO
            + " TEXT," + KEY_STATUS + " INTEGER" ;

So created a function , which will create SQlite syntac for table creation
And created object , which need to be passed to the  function

Tuesday, July 31, 2012

Coneecting ADT with Android device via Wireless network(Only for rooted devices)

This post is with the intention of eliminating the data cable which we normally use between Real device and Eclipse.

  • First of the android device should be rooted(Must have administrative permissions) , here is a link for rooting Android device(Galaxy pop S5570).In brief the procedure is to download a recovery file into the mobile phone SD card and then switch off the phone ---> then hold home and power button till you find the company logo , then you are into the recovery mode--> use volume buttons to slide up and down select "Apply update from SD card" and press home button to select then click "Reboot system now".
  • Download ADBWireless android app into your phone follow this link to get there. If you any issues with this app have a look at this androidcentral
  • Now its time to use the command prompt from your windows here is the procedure follow androidcentral link
  • If you any issues with the path of ADB follow this link  . That's it!!!!!!!!!!                                                       

Sunday, May 27, 2012

Moving Apps to SDCard in Android Phone

  • In Android Many apps cant be moved from phones internal memory to SDCard , Facebook was one of the app which i couldn't transfer to SDCard . 
  • But there is a solution to do this,Just u need to have android SDK installed in your PC/laptop.
  • Connect your Android through USB port(Make sure u have installed the your phone device driver).And in your Android device go to Settings-->Applications-->Development and check mark the USB debugging.
  • Then from the command prompt locate the location of ADB(Usually it will be in android-sdk-windows/platform-tools for windows machine) .
  • Then From the command prompt  type "adb device", after clicking Enter you must be able to see your Android device name.
  • After that to make SDcard as the default location for instaltion of app and also to tranfer app from internal storage to SDcard use "adb shell pm setInstallLocation 2"
  • Now you can see the apps which previously not able to transfer to SDcard are getting transferred.
  • If you want to disable this Then you van use "adb shell pm setInstallLocation 0
  • Reference Link

Thursday, November 24, 2011

A Tool to help Android UI desiginers:Android Design Preview

Check out this , it lets the designers to see his design into a real time anDroiD device. Here is the link for more information. 

Displaying anDroid Screen on to PC/Laptop

If there any application presentation needed to be done ,it cant be done done on 4 inch screen . There are some tools through which you can Display your anDroiD device screen on to computer. One good tool which came across was Ashot: AndroidScreenCapureSetup.v1.1 , u can get download link here

Friday, October 7, 2011

Facebook Hash Key on windows

To Develop facebook app for anDroiD u need to get Hashkey.So go to Cmd prompt

Download the openssl for windows here . Then unzip and save it
Now in the cmd prompt change dir to the bin folder of the jdk(which u have installed before using Eclipse) 
Type the command:
keytool -export -alias myAlias -keystore C:\Users\mpg\.android\myKeyStore | D:\software\openssl-0.9.8k_WIN32\bin\openssl sha1 -binary | D:\software\openssl-0.9.8k_WIN32\bin\openssl enc -a -e   

The Red color highlighted is the location of your "keystore" folder,which u can finf in c/users/user_name/.android.
The Light Pink color is the path of the unziped location of the downloaded openssl.
In the figure the highlighted text is the hashkey.which u need to insert while creating the application in the URL , Just login and create the new app.