webIntent receive url from youtube


hi guys,
i am trying to set up a way to receive a url from youtube.
i’ve tried this piece of code(found in doc):

    constructor(public navCtrl: NavController,platform: Platform) {
        platform.ready().then(() => {

            function(url) {
        console.log("succes" + url);
      }, function(url) {
          console.log("error" + url)


<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
    <intent-filter android:label="@string/launcher_name">
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <action android:name="android.intent.action.SEND" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="text/plain" />

i’ve some question:
console i have : “succes false”, maybe beacuse this code run at startup. If i re-try to share in console i see anything. Maybe it’s in wrong place?
have you ideas?
i loss a lot of hour and i haven’t solutions, Thanks to all!
PS:i use typescript

Quick Ionic 2 Update