I've an Android and iOS app with source code. These 2 apps are created by another vendor. I need to use my cordova app to pass in some custom parameters to thesw 2 apps and launch it.
for cordova app, how do we launch native app with parameter ?
Use intent to launch the Android app while use Custom URL Scheme to start the iOS one. Both of them can take parameter.
1 As you have the source code the two apps, you need to edit the androidManifest.xml and info.plist respectively, allowing the native apps to recognize your intention.
2 change the source code for each platform, making them do something special with the parameters.
reference link
Android
https://developer.android.com/guide/components/intents-filters.html
iOS
https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html
Related
I want to executive/run other pre-installed android based application inside my new developed application. For example I want to run what's app, Facebook, and Skype at the same time within my application.
I am analyzing about the android containers in which application can be load and execute. Like we used WebView container to load website.
Please suggest for the same
You should use Deep Links or better Dynamic Links - https://firebase.google.com/docs/dynamic-links/android/receive
How it works? You have 2 buttons in your App. On click on them you will open needed app or open it page on Play Market (or your own web site or something else, because you can config it via Dynamic Links).
I know it's possible to communicate with native android components via the Intent call, but I'm trying to figure out how to launch an app (which is installed) through an Adobe Air application.
Currently, thanks to Ben, I know that...
var url:String = ("intent:#Intent;" +
"action=android.intent.action.MAIN;" +
"category=android.intent.category.LAUNCHER;" +
"component=com.android.settings/.Settings;" +
"end");
navigateToURL(new URLRequest(url));
...launches the Android Settings menu through an Air app, which is awesome.
But I'm trying to launch an app...and I believe the secret lies within the "component=com.android.settings/.Settings;" snippet. Does anybody know how I can modify this code to launch an installed app on a device?
My kingdom for an answer. I've scoured the internet for days searching on this.
Brad
It depends on your use case.
If there's one specific app you want to open, you can look inside that app's .apk for the <intent-filter> elements, as explained in Launch custom android application from android browser. Then craft the appropriate URL to pass to navigateToUrl().
Another possibility is to get the package name for the app you want to open and set that as the component= section of your URL. Fair warning, I'm not actually sure if that will work.
If you don't know what app you want to open at compile-time, it's harder (e.g. if you have a server-side list of applications that your AIR app may need to invoke). Launch an application from another application on Android shows how to launch an application if you only know the package name, but you'll need a native extension to enable that functionality.
I am developing an app with Backbone JS and XDK.
I need to launch the App comming from an email link going to a path like index.html/#login/kasdjf98458328/expale#example.com/
We are using a route like myapplication://#login/kasdjf98458328/expale#example.com/ but it doesn' t seem to work. It just goes to the app index.html.
I have read that in native Android you need to specify that the app is BROWSABLE
How can I access the app this way using Intel XDK?
Thank you.
To be able to pass parameters to appmobi or xdk app from android uri. Simply use uri schema://index.html?key=value
You can use intel.xdk.device.queryString to recover the parameters.
I am creating an app that i would like to have apps running within it like let's say an iframe on a website. Is this possible? For example i will open my app and it will show the Gallery of the phone but while running my app, and not just by opening the gallery app which will make my app minimized. I want it exactly like an iframe, is this possible?
you can not run another app within your own application. You can do any of the following two
start the other app by sending intent message
or create the other app's features similarly in your own app.
According to your question if your need is to create a gallery then why aren't you creating a own gallery in your app? that will be more easier and flexible
You can not run another app's Activities within your app in an iframe style for security reasons, sorry.
Yes, I believe that is is possible for Apps to run cross platform if there exist a common data framework that creates a uniform standard for how data is stored and referenced. So the data can exist in the cloud but referenced via each app independently of the mobile phone platform.
Is it possible to launch one app from another using Phonegap? We want to call a player app from a store app?
We also need the 2nd app to be able to return a variable to a script in the first app.
Cheers
Paul
Yes, it is possible but you'll probably end up needing to write a plugin to call an Android Intent. Many of the core PhoneGap API's like Camera use Intents.
http://developer.android.com/guide/topics/intents/intents-filters.html
http://wiki.phonegap.com/w/page/36753494/How%20to%20Create%20a%20PhoneGap%20Plugin%20for%20Android