How can I avoid or dismiss Android's Bluetooth pairing notification when I am doing programmatic pairing?

I have an app where I am programmatically controlling Bluetooth pairing and unpairing. I can pair before connection and unpair afterwards. The reason I need to do this is specific to my application and not in the scope of my question. Basically what I am doing is: Get a reference ib to IBluetooth object as […]

Android URL to Uri

I have to change URL to URI, please guide me how can I change it. I have tried a lot, but not getting the solution. Any help is appreciated. I can also attach code snippet if required.

android wait asynctask to finish

I have a function, AppHelper.isOnline(Context context), I call in various parts of my application to check that a session didn’t timeout before making an HTTP request. public void onClick(View v) { Intent intent = null; switch (v.getId()) { case if (AppHelper.isOnline(this)) { //here AppHelper.isOnline should have finished it’s async task intent = new Intent(this, […]

How to set Java SDK path in AndroidStudio?

I had JAVA SDk 1.7.0_21 installed and I installed 1.7.0_45 today after uninstalling the previous version. Now AndroidStudio has stopped compiling projects and says that it cant locate the 1.7.0_21 folder. How can I set the new path for Java SDK? I have changed the environment variables also but didnt work.

How to create an alphabetical scrollbar displaying all the letter in android?

My purpose is to obtain something like that : But the only examples i can find are lists like that : android – listview fastscroll with alphabet like on iPhone contacts activity Obviously, I don’t want a list like the contacts which displays the letters when you fastscroll. I know how to do this. Any […]

Creating a java library with Eclipse

I’m fairly new to Java and Android programming in general but I would like to create a small java library for sharing some code between an ordinary (non-Android) java application and an Android application; so my question is the best way of creating an ordinary java library with Eclipse. I didn’t find anywhere the option […]

Android HttpsUrlConnection eofexception

I have a problem where my HttpsURLConnection will throw an EOFException when i try to read any input. The code works for some network calls, but fails on others. If i try and read anything from the connection, it fails with the aforementioned error. Example: urlConnect.getResponseCode() // will throw error urlConnect.getResponseMessage() // will throw error […]

Creating a setError() for the Spinner

How do you create the setError() (similar to that of a TextView/EditText) function for a Spinner? The following doesn’t work: I tried extending the Spinner class and in the constructor: ArrayAdapter<String> aa = new ArrayAdapter<String>(getContext(), android.R.layout.simple_spinner_item,, items); aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); setAdapter(aa); tv = (TextView) findViewById(; // types_layout_list_tv ctv = (CheckedTextView) aa.getDropDownView(1, null, null); tv2 = (TextView) […]

Android AVD not showing anything. only “ANDROID” in the middle of the screen

I am an Android Newbie! please help. I have been following googles introduction tutorial and managed to install everything with no problems. but whenever i try to run the HelloAndroid example the avd launches but doesnt show anything. cone somebody help please?

Android “single top” launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity’s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would reuse a single Activity instance and give me the Intent in the onNewIntent callback. I did both of these things, and onNewIntent never fires and onCreate fires […]

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