Intent provided by Cursor is not fired correctly (LiveFolders)
Posted
by Felix
on Stack Overflow
See other posts from Stack Overflow
or by Felix
Published on 2010-04-15T13:08:03Z
Indexed on
2010/04/18
11:53 UTC
Read the original article
Hit count: 283
android
|android-livefolders
In my desperation with trying to get LiveFolders working, I have tried the following in my LiveFolder
ContentProvider
:
public Cursor query(Uri uri, String[] projection, String selection,
String[] selectionArgs, String sortOrder) {
MatrixCursor mc = new MatrixCursor(new String[] { LiveFolders._ID, LiveFolders.NAME, LiveFolders.INTENT } );
Intent i = null;
for (int j=0; j < 5; j++) {
i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com/"));
mc.addRow(new Object[] { j, "hello", i} );
}
return mc;
}
Which, in all normalness, should launch the Browser and display the Google homepage when clicking on an item in the LiveFolder. But it doesn't. It gives a Application is not installed on your phone
error. No, I'm not defining a base intent for my LiveFolder.
logcat
says:
I/ActivityManager( 74): Starting activity: Intent { act=android.intent.action.VIEW dat=Intent { act=android.intent.action.VIEW dat=http://www.google.com/ } flg=0x10000000 }
It seems it embeds the Intent
I give it in the data
section of the actually fired Intent
. Why is it doing this? I'm really starting to believe it's a platform bug.
© Stack Overflow or respective owner