Friday, July 29, 2011

Market filters

Today's challenger was the defect where some Android devices did not see some apps on Android Market and some other did. Android is complicated in this area too. If your device is not good for a certain app Android Market hides the app rom the view. On one hand it's good. If your device cannot run an app why bother and display it? On the other what if I, a user, want this app so bad that I wanna buy a new phone just to make this app happy. How am I supposed to know what phone I need and what features or operating system version it should have?


Anyway the solution (not for newbies) lies here. This article explains a million complicated reasons why you don't see your app. I think Google should always display apps like that. But it should not let user to install them with explanations why.












Wednesday, July 13, 2011

Broadcast receiver problem

Today I saw a weird bug. I had a broadcast receiver in one app's AndroidManifest.xml


<receiver android:name=".MyReceiver">


<intent-filter>


<action android:name="com.my.intent.update" />


</intent-filter>


</receiver>




and another app sent broadcast with the intent the first app had to handle.




Intent intent = new Intent("com.my.intent.update");


sendBroadcast(intent);




The problem was it never did. I spent some time and asked my co-worker to look at it with me. While looking I found the problem (pair programming works after all). I had an activity in the same manifest file that had a receiver that handled the same intent!





<activity android:label="Test" android:name=".HomeActivity"


android:launchMode="singleTask" android:configChanges="orientation">


<intent-filter>


<action android:name="com.my.intent.update" />


</intent-filter>


</activity>




I don't know why it was there but it made receiver never handle the intent.



Tuesday, July 12, 2011

Echo from Android.mk

$(info YOUR MESSAGE HERE)