Corova cordona plugin not working

I really want to grab a web link that can launch my launcher app. I am using the code as shown below. [written in AndroidManifest.xml].

<intent-filter>
    <action android:name="android.intent.action.VIEW" />    
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />                   
    <data
        android:host="mysite.com"
        android:pathPrefix="/_mobile/"
        android:scheme="http"                   
    />              
</intent-filter>

      

The application launch is successful when I try to visit "mysite.com/_mobile". Basically, the above link is actually a link to the mobile version of my main website. Now, if the user has installed the app, they should open the app, not the mobile web page. So far this works great. Now the problem is when I want to navigate to a specific page in the application. for example "mysite.com/_mobile?productId=103" - this will open the page for productId = 103 in the mobile web view. But, if the user has installed my application, how can I redirect it to the productId page in the application. I did some searches on this topic and came across the cordova plugin. I have added this plugin so called "Initsogar / cordova-webintent" here .Now I am using this code,

window.plugins.webintent.getUri(function(url) {
    if(url !== "") {
        alert("URL was "+url);
    }
});

      

All I want is to get the uri that started the application. I am not getting the desired result. I tried to alert some value to check if this code works or not, it seems it does NOT. see the code i used for testing:

window.plugins.webintent.getUri(function(url) {
  alert(2);    
  if(url !== "") {                
     alert("URL was "+url);
  }         
}); 

      

Here 2 is not warned. I don't know what happened to this plugin. other than that, I don't know where to start. any help would be great. :)

+3
android cordova cordova-plugins cordova-3


source to share


No one has answered this question yet

Check out similar questions:

1858
"Debug certificate expired" error in Android Eclipse plugins
ten
Get url in Ionic / Cordova
nine
Android: handle OAuth callback with intent filter
8
Sending url to ionic android app via web app from another app
4
Cordova Android app "Cordova Plugin" does not display permission dialog
4
Cordoba fcm plugin on Android data.wasTapped not working
4
Fix android intentional filter config to associate file type with activity?
1
Android - try connecting to Dropbox API version 2
0
Cordova IOS camera plugin not working when trying to open from inappbrowser
0
Cordova: PLugin camera not working



All Articles
Loading...
X
Show
Funny
Dev
Pics