Product title and description is not showing after replacing the public key (Base64) Android in-app purchase

Here is the code which I am using. I have replaced the original API key in the proper place. I have changed the Sample title and description in Google Play In-app console and also replaced the public key, but in place of title and description it is showing default title of the app, not from […]

How to make border for circle cropped image in glide

in default, the image that is cropped by glide has no border I need to have a border in the circle image.

Cannot run program “ xx/sdk//tools/emulator”: java.io.IOException: error=2, No such file or directory

I have installed android SDK and android eclipse plugin successfully on Ubuntu 12.10. I created the AVD in eclipse, and now it’s not running. This is the output error I receive when I run the AVD:it tips: Starting emulator for AVD ‘avd’ Failed to start emulator: Cannot run program “/home/sancai/android/adt-bundle-linux-x86_64-20130522/sdk//tools/emulator”: java.io.IOException: error=2, No such file […]

How to set icon for dialog in Android

I want to customize a dialog in Android. I know how to set the title for dialog: dialog.setTitle(“O message”); Now I want to set the icon in front of the title. How can I achieve this? Dialog dialog; dialog = new Dialog(this); dialog.setContentView(R.layout.layouterror22); dialog.setTitle(“O message”);

How to find out whether a particular device has SIM Hardware support?

I wanted to disable features related to CALL and SMS in my application based on whether SIM hardware is present or not. Now a beginners approach towards this will be checking the Phone type using : if (telephonyManager1.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) If true then its supported. Everything was fine until i came across Sony Tablet S […]

InApp Purchased in Android

public static boolean verify(PublicKey publicKey, String signedData, String signature) { Log.i(TAG, “signature: ” + signature); Signature sig; try { sig = Signature.getInstance(SIGNATURE_ALGORITHM); sig.initVerify(publicKey); sig.update(signedData.getBytes()); if (!sig.verify(Base64.decode(signature))) { Log.e(TAG, “Signature verification failed.”); return false; } return true; } catch (NoSuchAlgorithmException e) { Log.e(TAG, “NoSuchAlgorithmException.”); } catch (InvalidKeyException e) { Log.e(TAG, “Invalid key specification.”); } catch (SignatureException […]

Tricks to keep phone from sleeping in mobile web browser using JavaScript/HTML?

I know for native mobile applications on Android and iPhone there are easy ways to keep the phone from sleeping, but I am building a mobile web application running in the mobile web browser and would like to explore that possibility. I have a feeling this isn’t possible for security reasons, but I thought maybe […]

How to obfuscate only few class or a single package?

I would not obfuscate all my project but just the mostly key class. how to write the proguard file to exclude all project and obfuscate only a single class or a single package ?

What is the working of setTag and getTag in ViewHolder pattern?

I have a simple code snippet for implementing custom listview. My code is as follows: WeatherAdapter.java : public class WeatherAdapter extends ArrayAdapter<weather>{ Context mcontext; int mlayoutResourceId; weather mdata[] = null; View row; public WeatherAdapter(Context context, int layoutResourceId, weather[] data) { super(context, layoutResourceId, data); mlayoutResourceId = layoutResourceId; mcontext = context; mdata = data; } @Override public […]

Does Google Maps Android MapView use different resolution tiles for different screen densities?

I am trying to overlay my own custom images on top of a MapView in Android. It is important that my images align correctly with the underlying Google Maps tiles, because it is a map of a university campus whose features must align with Google’s underlying tile features. Are the tiles Google provides for a […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.