SHA1 certificate fingerprint

I am trying to make an app that can communicate with Google Cloud Messaging. I have looked at some tutorials and read a lot of stuff, but it all skips one point. When configuring an Android Key for API Project it asks for a SHA1 certificate fingerprint. How do I find this (I have eclipse […]

Android emulator can't be started

I’ve made some Android emulator device, and try to execute it. I’ve got the following errors: 02-18 05:46:39.070 99-99/? E/SurfaceFlinger﹕ ERROR: failed to open framebuffer (No such file or directory), aborting 02-18 05:46:39.070 99-99/? A/libc﹕ Fatal signal 6 (SIGABRT) at 0x00000063 (code=-6), thread 99 (surfaceflinger) 02-18 05:46:43.430 137-137/? E/cutils﹕ Failed to read /data/.layout_version: No such […]

FileNotFoundException on Android version > 2.3

I try to download a file to sdcard on my phone. On Android 2.1, 2.2 and 2.3 everything works like intended, but on Android 4.0 (testen on emulator and my Galaxy Nexus) it throws a FileNotFoundException. Stacktrace: 02-27 21:49:06.733: W/System.err(27648): java.io.FileNotFoundException: http://www.wdr.de/wdrlive/media/wdr5.m3u 02-27 21:49:06.733: W/System.err(27648): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177) 02-27 21:49:06.733: W/System.err(27648): at de.arvidg.test.StartActivity$9.run(StartActivity.java:833) 02-27 21:49:06.733: W/System.err(27648): […]

kill a process running in the android emulator

How do I kill an application running in the emulator? I mean manually and not through code. The Settings->Apps->Running tab does not display my application and Dev Tools->Running Processes lists my application but I don’t see how to kill the process. I don’t see any option in adb to kill a process either.

My class derived from SQLiteOpenHelper is getting huge

My class derived from SQLiteOpenHelper is getting bigger and bigger over a time. At the speaking time it is more than 1500 lines of code which is not considered to be cool. There might be some elegant solution to prevent it from growing, i.e. separating by peaces. Not sure what those peaces to be though. […]

ActionBarDrawerToggle is not setting Drawer Indicator

I am trying to add the navigation drawer in my app.. Everything is working fine But now I still got the arrow icon although I replaced it with the ic_drawer from Android? Here’s my code: private ActionBarDrawerToggle mDrawerToggle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); DrawerLayout mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); ExpandableListView mDrawerList = (ExpandableListView) […]

Android:how to find the android version name programmatically?

i write code for finding the android version like this String version=Build.VERSION.RELEASE; by using this code i am get the version number but i want version name. how to get the version name???/

NotificationCompat.setStyle() can't get Notification.MediaStyle

I’ve found out that the MediaStyle setStyle is not working when I’m using NotificationCompat.builder(this) to make a notification. I mean, When using this on NotificationCompat.Builder(this): .setStyle(new Notification.MediaStyle() .setMediaSession(mySession)) It saying it wants to get NotificationCompat.style instead of Notification.MediaStyle. Can you help me solve that problem? Is there any replacement for the NotificationCompat? Thanks.

Best way to store SparseBooleanArray in Bundle?

When a config change happens, my ListView Checkbox states get lost, which I understand why. I try to implement public void onSaveInstanceState(final Bundle outState) in one of my Fragments. So I’m just wondering what’s the easiest way to store my SparseBooleanArray in the outState. Also, I’m a bit confused, as ListView has the method: getListView().getCheckedItemPositions(); […]

Retrieve Context from a fragment

I created a class to retrieve comments from a JSON encoding from a PHP file. This class, extends from AsyncTask: public class RecuperarComentarisFoto extends AsyncTask<String, String, String>{ @Override protected void onPreExecute() { super.onPreExecute(); pDialog = new ProgressDialog(????); pDialog.setMessage(“Creating Product..”); pDialog.setIndeterminate(false); pDialog.setCancelable(true); pDialog.show(); } @Override protected String doInBackground(String… arg0) { // TODO Auto-generated method stub return […]

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