Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

341
Views
Is it possible to open a game on the phone, for example, or enter the gallery while in my application?

I recently started programming, and I don’t have enough experience yet - so I ask you to help ...

I use Unity 2020, and the task arose to open games that are on the phone, for example, a gallery and other applications that are on the phone (not to open a link on the Internet, but an application on the phone), I have a code that makes it possible to control, for example, a browser located in the scene, while all this happens in my application, but I still wanted to know if this is possible, only not with the pages on the Internet, but with the applications themselves on the smartphone ... Thanks in advance!

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

ok, so for launch camera app you can use only C#:

 static int REQUEST_IMAGE_CAPTURE = 1;

 public void StartPlugin()
    {
      
        
        AndroidJavaClass IntentClass = new AndroidJavaClass("android.content.Intent");
        AndroidJavaObject IntentObject = new AndroidJavaObject("android.content.Intent");

        AndroidJavaObject MSObject = new AndroidJavaObject("android.provider.MediaStore");

        IntentObject.Call<AndroidJavaObject>("setAction", MSObject.GetStatic<string>("ACTION_IMAGE_CAPTURE"));

        AndroidJavaClass unity = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
        AndroidJavaObject currentActivity = unity.GetStatic<AndroidJavaObject>("currentActivity");
        currentActivity.Call("startActivityForResult", IntentObject, REQUEST_IMAGE_CAPTURE);

    }

and for launch app like viber, youtube you can use this code:

 private string package = "com.viber.voip";

 public void Launch()
    {
   
                    AndroidJavaClass activityClass;
                    AndroidJavaObject activity, packageManager;
                    AndroidJavaObject launch;



                    activityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
                    activity = activityClass.GetStatic<AndroidJavaObject>("currentActivity");
                    packageManager = activity.Call<AndroidJavaObject>("getPackageManager");
                    launch = packageManager.Call<AndroidJavaObject>("getLaunchIntentForPackage", package);
                    activity.Call("startActivity", launch);
                
                 
    }

the package variable it is application id have a nice day!!! =)

over 4 years ago · Santiago Trujillo Report

0

For some applications (such as YouTube, Facebook) you can use

Application.OpenURL("http://unity3d.com/");

but this only works if you know the app link, for social media you can try the links until you find one that opens the app.

I haven't tried to do this with other apps, but if you can get the URL of the app (it's not too hard), you should be able to do it.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!