Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Needs more info
    • Affects Version/s: None
    • Component/s: Studio
    • Environment:

      Description

      I want to add an URL handler to my app. Currently, the app is opening when I open 'myapp://history', but there is no way to receive 'history' in the app. I followed a bunch of tutorials, including the tutorial of Fokke, but the intent data is always null.

      tiapp.xml

                      <activity
                          android:configChanges="keyboardHidden|screenSize"
                          android:launchMode="singleTask"
                          android:name="org.appcelerator.titanium.TiTranslucentActivity" android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar">
                          <intent-filter>
                              <action android:name="android.intent.action.MAIN"/>
                              <category android:name="android.intent.category.LAUNCHER"/>
                          </intent-filter>
                          <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:scheme="myapp"/>
                          </intent-filter>
                      </activity>
      

      First lines of alloy.js

      if (OS_ANDROID) {
      	var platformTools = require('bencoding.android.tools').createPlatform(),
      	    wasInForeGround = true;
       
      	setInterval(function() {
      		var isInForeground = platformTools.isInForeground();
       
      		if (wasInForeGround !== isInForeground) {
      			if (isInForeground) {
      				console.log('start');
      				console.log(Ti.Android.currentActivity.getIntent());
      				console.log('stop');
      			}
      			wasInForeGround = isInForeground;
      		}
      	}, 2000);
      }
      

        Attachments

          Activity

            People

            • Assignee:
              sdarda Sharif AbuDarda (Inactive)
              Reporter:
              janvankampen Jan van Kampen
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration