Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with InAppBrowser to launch app from another app #330

Open
rolinger opened this issue Sep 2, 2020 · 2 comments
Open

Not working with InAppBrowser to launch app from another app #330

rolinger opened this issue Sep 2, 2020 · 2 comments

Comments

@rolinger
Copy link

rolinger commented Sep 2, 2020

I did the standard install for primary app and then on secondary app I created a link to call/open the primary app using InAppBrowser - but when I click on the link in secondary app nothing happens. I then tested InAppBrowser on secondary app to open a general website (google) and it worked just fine.

On primary app:
ionic cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=primaryapp

In primary app config.xml: `

On secondary app template:
<button ng-click="openApp();">launch app</button>

Secondary app controller:

  $scope.openApp = function() {
    cordova.InAppBrowser.open('primaryapp://', '_system') ;
    console.log("launching app") ;
  }

In secondary app, nothing happens, but console message does get displayed. Is there a call back I can set that might tell show me an error? Or what am I missing from my configs?

@rolinger
Copy link
Author

rolinger commented Sep 2, 2020

I then tried another method using https://github.com/lampaa/com.lampa.startapp - an app I know that works launching other apps like Uber, FB etc. But that plugin is also not finding primaryapp and is defaulting to taking the user to the app stores to get the app - but the app is already installed.

@rolinger
Copy link
Author

rolinger commented Sep 2, 2020

Using the com.lampa.startapp plugin, I am getting the following error on my URL_SCHEME:

class android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=com.primaryapp:// }

I am only testing on Android so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant