Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by nj4242 · Nov 04, 2016 at 05:14 AM · c#androidappgalleryapplication.openurl

open another app from ours?

Hi, I want to open gallery from my android app. I found somewhere that you can do it using`Application.OpenURL`having gallery URI path in it. But I don't have a sun beam of idea to do it anyway. Can somebody know how to achieve it, opening certain app from our application. Thanks!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DeveshPandey · Sep 18, 2017 at 06:19 PM 0
Share

see this nice plugin it may help you to launch any other app in android and ios... http://unitydevelopers.blogspot.in/2017/06/launch-any-app-from-unity-android-ios.html

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by HarshadK · Nov 04, 2016 at 05:35 AM

Here are some of the solutions:

https://forum.unity3d.com/threads/android-ios-launch-from-within-a-unity-app-another-unity-app.222709/#post-1486300

https://forum.unity3d.com/threads/android-ios-launch-from-within-a-unity-app-another-unity-app.222709/#post-2308076

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nj4242 · Nov 04, 2016 at 09:26 AM 0
Share

This link : (https://forum.unity3d.com/threads/android-ios-launch-from-within-a-unity-app-another-unity-app.222709/#post-1486300) is kinda similar to what I am looking for, but since I wanted to open Gallery, I don't know what activity to call or what Intent, I mean I just wanted to know what should I write for opening gallery activity.

Take a look at this code :

 bool fail = false;
 string bundleId = com.google.appname; //target bundle id for gallery!?
 AndroidJavaClass up = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
 AndroidJavaObject ca = up.GetStatic<AndroidJavaObject>("currentActivity");
 AndroidJavaObject package$$anonymous$$anager = ca.Call<AndroidJavaObject>("getPackage$$anonymous$$anager");
      
 AndroidJavaObject launchIntent = null;
 try
 {
     launchIntent = package$$anonymous$$anager.Call<AndroidJavaObject>("getLaunchIntentForPackage",bundleId);
 }
 catch (System.Exception e)
 {
     fail = true;
 }
  
 if (fail)
 { //open app in store
     Application.OpenURL("https://google.com");
 }
 else //I want to open Gallery App? But what activity?
     ca.Call("startActivity",launchIntent);
  
 up.Dispose();
 ca.Dispose();
 package$$anonymous$$anager.Dispose();
 launchIntent.Dispose();

Now, I want to open gallery activity in the else block, Any Idea how can I do that? Thanks for sharing!!

avatar image nj4242 · Nov 04, 2016 at 12:48 PM 0
Share

I found my native android gallery's bundle ID, so I replaced the code above with this:

 string bundleId = "com.android.gallery3d";

But it doesn't helps me either, it does not open anything!

avatar image
0

Answer by DeveshPandey · Jan 07 at 07:13 AM

Hello,

Here is the simple code for iOS to launch any other installed app from your app. You have to put this objective c file in your Plugins/iOS folder and call the function. Here is the link which can help you.

http://unitydevelopers.blogspot.com/2017/06/launch-another-ios-app-from-your-app.html

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

250 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UI Button when build to android function does not work 0 Answers

How to change an Android's app icon while running the app itself in the phone? 2 Answers

making your app connect to a tv? 0 Answers

Application.openurl won't work on android? 1 Answer

Why does .apk file being built consumes so much space? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges