The method 'getSupportFragmentManager()' is unsuported

So i’m trying to enable datepicker for android versions bellow 11. for that i’m using support library v4. I import all the thing necessary: import*; import; import; import; import; import; And i created a class: import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import; import; import android.os.Bundle; import; […]

How should i do from notification back to activity without new intent

from Android Development, i implement a simple notification by the sample code, but in my app, i don’t want to new intent and create the activity again, i just want to back to my last activity(it’s a mediaplayer UI). if i use the sample code, it will create a new activity by Intent resultIntent = […]

Android: Changing Background-Color of the Activity (Main View)

I want to change the background color of my Main-View (not a Button or a Text-View) just the real background which is normally black… I got this code: view.setBackgroundColor(0xfff00000); This is inside an OnClickListener, but it just changes the background of the Button… Please help me, thanks a lot!

How to create barcode scanner (Android)?

Can someone tell me if creating barcode scanner app (for Android) is difficult? Is OpenCV library good start? Where can I find algorithm which clearly explains how to read barcodes? I will appreciate all good materials about this topic! Thanks in advance!

why i get Some file crunching failed after i rename drawable file to .9.png?

I am testing 9-patch image . Before everything works fine , and i rename drawable file ic_button_beat_box_default.png to ic_button_beat_box_default.9.png , then i get error : Some file crunching failed, see logs for details . Then i rename back , it works normal. So how this happens ? The complete error is : FAILURE: Build failed […]

Genymotion Emulator : Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY

I have a project with V1 of Google Maps API. So i need the follow tag in my manifest <uses-library android:name=”” /> The problem is when i try to run on a Genymotion emulator. I received this error Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY When i remove the uses-library tag I can run my project but then i […]

Using LGPL library in Paid Android App

Can I use a LGPL library in my paid android application? I am not going to modify the LGPL lib, I just want to use it. Is it legal?

Calculating the angle between the line defined by two points

I’m currently developing a simple 2D game for Android. I have a stationary object that’s situated in the center of the screen and I’m trying to get that object to rotate and point to the area on the screen that the user touches. I have the constant coordinates that represent the center of the screen […]

Android: how to use dip (density independent pixel) in code?

How do I specify that an int parameter is in dip? Specifically, how would write the equivalent of: android:layout_width=”50dip” android:layout_height=”50dip” Something like…: LayoutParams params = new LayoutParams(50, 50)

open a dialog when i click a button

I have a button and I would like to open a dialog when pressed. This is my code: Button more = (Button) findViewById(; more.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { //Intent myIntent = new Intent(view.getContext(), agones.class); //startActivityForResult(myIntent, 0); AlertDialog alertDialog = new AlertDialog.Builder(this).create(); alertDialog.setTitle(“hi”); alertDialog.setMessage(“this is my app”); alertDialog.setButton(“Continue..”, new DialogInterface.OnClickListener() { public void […]

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