Android: Listen for app installed / upgraded broadcast message

Using Lookout app (, I see every time I install or upgrade app, it’ll automatically scan this app to ensure it’s not malicious. Follow Lookout, I write a simple app which listen broadcast message whenever each app is installed or upgraded. AFAIK, there are some type of IntentFilter for broadcast message, it is: Intent.ACTION_PACKAGE_ADDED Intent.ACTION_PACKAGE_CHANGED […]

Android usb host: asynchronous interrupt transfer

I’m trying to connect a USB-Device ( build by myself ) to communicate with my development board ( ODROID-X ) Unfortunately, the examples are very little, as far as the asynchronous communication. I’d some problems with the interrupt driven data exchange – how to build the connection by using the asynchronous interrupt mode? In one […]

Align spinner values to right instead of left

In spinner xml, I’m using: android:entries=”@array/cars” where cars is list of numeric items. The spinner automatically align values to left, and I can’t find in xml/code how to change it.

Android, simple-xml, how to declare a list of elements?

I have this data structure: <estates version=”0.1″> <provider name=”Foo”> <estate id=”12345678″> <description>aaa</description> <size>300</size> </estate> <estate id=”12345679″> <description>bbb</description> <size>450</size> </estate> </provider> <provider name=”Bar”> <estate id=”987654321″> <description>yyy</description> <size>100</size> </estate> <estate id=”987654320″> <description>zzz</description> <size>240</size> </estate> </provider> </estates> which I get from a web service of mine. I would like to instantiate Android “Estates”, “Provider”, and “Estate” classes, using […]

intent.putExtra() in pending intent not working

I am passing a pending intent through alarmreceiver, from a service class. But, after the pendingIntent fires, the intent.putExtra() information is not being received by the broadcastreceiver class. Here is my code for firing the pendingIntent Intent aint = new Intent(getApplicationContext(), AlarmReceiver.class); PendingIntent pendingIntent = PendingIntent.getBroadcast(getApplicationContext(), id, aint, PendingIntent.FLAG_UPDATE_CURRENT); aint.putExtra(“msg”, msg); aint.putExtra(“phone”, phone); alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), […]

Remove orientation restricitons programmatically

In my manifest I’ve setup an activity restricted to portrait orientation. But I need to remove this restriction on condition. So, how do I achieve removing orientation restrictions programmatically ? upd: my present settings are: <activity android:name=”.activity.MainActivity” android:label=”@string/app_name” android:theme=”@android:style/Theme.NoTitleBar” android:screenOrientation=”portrait” android:configChanges=”orientation”> /** * Defines whether the device being used is a tablet and if so […]

TextView and Button in each row and onListItemClick()

I have a ListView with some elements on it. Each row has a TextView and a Button. It looks like this: | Some text in a row (Button) | Now, when I click on this text nothing happens. Simply no one function is called. But when I click on the button I can handle the […]

AlertDialog – do not dismiss on item click

OK so I am creating an ArrayAdapter and using it in my Alert Dialog because I don’t want to show the default radio buttons on SingleItemSelection dialog. Instead I want to change the background of the item that is selected, and then when the user presses the positive button I will perform the action related […]

Fixing Eclipse errors when using Android NDK and std::vector

I’m using eclipse to develop an android app that also uses the ndk. I vectors in my app and I’ve done the necessary stuff to get them by including APP_STL := stlport_static In my Everything is working fine it compiles and runs but Eclipse keeps giving me errors when I use the vectors std::vector<int> […]

How to “install” Action Bar Sherlock?

I’m trying to build the sample project “Action Bar Styled” using the Action Bar Sherlock. I download the .zip file containing ABS here but I can’t figure out where to unzip so that it will appear on Project>Properties>Add library. Can someone give me an hand? Also, I read somewhere (can’t find it now, sorry) […]

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