Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

340
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda