I have made an android app that includes a game module, I have made game using unity. Now I want to get game score back into my android application when user finish the game. I am starting game using an implicit intent.
Here is how i am starting game. startNewActivity(GameClubMediaIntro.this,"com.flieskiller");
public void startNewActivity(Context context, String packageName) {
Intent intent = context.getPackageManager().getLaunchIntentForPackage(packageName);
if (intent == null) {
// Bring user to the market or let them choose an app?
intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=" + packageName));
}
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
On game finished i need its score back into my android app. I have gone through this question, Read Android intent extra data on Unity app launch But it doesn't tell how to channel data back to app.