I have a unity game built, in C#, and an android app, in java. I would like to open the game from the android app as the app has some other functionalities that do not depend on the game.
I have never done integration of software before so I'm not sure how to proceed. I have thought about integrating the game within the app or have the game as a separate app on the phone and having the app opening it.
I would use this code fragment to launch the game from my main activity in android studio but I have some questions about it:
Button gameButton = (Button) findViewById(R.id.button_route_practice);
gameButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = getPackageManager().getLaunchIntentForPackage("com.Author.DriveAppGame");
startActivity(intent);
}
});
Where do I add my unity game package name for the app to find it?
How does android look for the game so that it actually starts it once the package name is found ?