0

I have a game(apk) that hides with Unity

I want to open the game through an Android application

The problem is that when I check out this installer says it is not installed...

  String packageName = "com.altaretore.falcon";
            if (UserSetting.isPackageInstalled(ActDownload.this, packageName))
                startActivity(getPackageManager().getLaunchIntentForPackage(packageName));
            else Toast.makeText(ActDownload.this, "App not installed", Toast.LENGTH_SHORT).show();
Kotlin
  • 23
  • 1
  • 6
  • https://stackoverflow.com/questions/3872063/launch-an-application-from-another-application-on-android Please show your UserSetting.isPackageInstalled – Stefan Sprenger Nov 29 '17 at 14:58
  • And you could also try to start the app manually via apk.exe, so you can say that the package name start leads to an application start of the right activity – Stefan Sprenger Nov 29 '17 at 14:59
  • final PackageManager packageManager = context.getPackageManager(); Intent intent = packageManager.getLaunchIntentForPackage(packageName); if (intent == null) { return false; } List list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); return list.size() > 0; – Kotlin Nov 29 '17 at 15:00
  • You can edit your question, so it gets well formatted. – Stefan Sprenger Nov 29 '17 at 15:06

0 Answers0