title: Sending url to ionic android app via webintents from another app
body: <p>Looking for an updated solution, running the latest ionic 1.1.0 release which uses Cordova 5.x. Trying to be able to browse a website in chrome and send that url to my ionic android app using web intent. My app compiles and runs, however when i attempt to use the share to feature from chrome(or any other app) and choose my app to share to, my app crashes.</p>
  
  <p>I first attempted to use the plugin:</p>
  
  <p>ionic plugin add <a href="https://github.com/Initsogar/cordova-webintent">https://github.com/Initsogar/cordova-webintent</a></p>
  
  <p>and then removed the plugin and i also tried a more recently updated fork:</p>
  
  <p>ionic plugin add <a href="https://github.com/fluentstream/cordova-webintent">https://github.com/fluentstream/cordova-webintent</a></p>
  
  <p>In my app.js file I putting the following code:</p>
  
  <pre><code>.run(function($ionicPlatform, $rootScope, $ionicHistory, $state) { 
    $ionicPlatform.ready(function() {
      window.plugins.webintent.getExtra(window.plugins.webintent.EXTRA_TEXT,
      function(url) {
        incomingURL = url;
        //alert(incomingURL);
        console.log(incomingURL);
      }, function() {
        incomingURL = false;
        //alert("no url");
        console.log("no url");
      });
    });
  })
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>.run(function($ionicPlatform, $rootScope, $ionicHistory, $state) { 
    $ionicPlatform.ready(function() {
      window.plugins.webintent.getUri(function(url) {
        if(url !== "") {
            alert(url);//url is the url the intent was launched with
        }
      }); 
    });
  })
  </code></pre>
  
  <p>In the file config.xml I would put:</p>
  
  <pre><code>&lt;plugin name="WebIntent" value="com.borismus.webintent.WebIntent"/&gt;
  </code></pre>
  
  <p>In the AndroidManifest.xml I would manually put in:</p>
  
  <pre><code>&lt;activity android:name="ShareActivity"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.SEND" /&gt;
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;data android:mimeType="text/plain" /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>The app runs, but when I go to chrome and click the share button, and then choose my app, the app shuts down the following android message appears:</p>
  
  <blockquote>
    <p>Unfortunately, MyAppName has stopped.</p>
  </blockquote>
  
  <p>Can anybody suggest a solution to getting the share to intent to work with my app...or am i forgetting something and doing something wrong.</p>
  
  <p>Thank you!</p>