2013-08-29, 06:30
I'm trying to launch the Google Play store with a prompt to install an app (e.g. com.google.android.apps.maps). Other JNI calls (like CXBMCApp::ListApplications()) succeed and return the expected data.
I added two breakpoints in XBMCApp.cpp:
The first time I run StartActivity(), nothing happens (both Breakpoint 1 and Breakpoint 2 are hit). The second time I run StartActivity(), Breakpoint 1is hit, then XBMC hangs for 5-20 seconds and then crashes back to the launcher (Breakpoint 2 is never hit).
Any clues as to what is going on, or where I should continue my bughunt?
Code:
StartActivity("com.android.vending", "android.intent.action.VIEW", "", "market://details?id=com.google.android.apps.maps");
I added two breakpoints in XBMCApp.cpp:
Code:
bool CXBMCApp::StartActivity(const string &package, const string &intent, const string &dataType, const string &dataURI)
{
// *** Breakpoint 1
CJNIIntent newIntent = GetPackageManager().getLaunchIntentForPackage(package);
// *** Breakpoint 2
if (!newIntent)
return false;
if (!dataURI.empty())
newIntent.setData(dataURI);
if (!intent.empty())
newIntent.setAction(intent);
startActivity(newIntent);
return true;
}
The first time I run StartActivity(), nothing happens (both Breakpoint 1 and Breakpoint 2 are hit). The second time I run StartActivity(), Breakpoint 1is hit, then XBMC hangs for 5-20 seconds and then crashes back to the launcher (Breakpoint 2 is never hit).
Any clues as to what is going on, or where I should continue my bughunt?