0

Im getting this error when trying to get links to launch my activity from the browser

08-24 16:38:13.877: ERROR/Tab(358): onReceivedError -10 wizi://logout The protocol is not supported.

<activity android:name="UrlActivity">

<intent-filter>
<category android:name="android.intent.category.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"/> 
<category android:name="android.intent.category.LAUNCHER"/> 
<data android:scheme="wizi" />

</intent-filter>
</activity>

this error is being thrown before onCreate() is called on UrlActivity,can anybody see what I'm doing wrong?

Nikola Despotoski
  • 49,966
  • 15
  • 119
  • 148
TNM
  • 11
  • 1
  • 2

2 Answers2

0

Are you using HTTPS protocol in any of your links? If so, you need to accept the certificate then. Make sure the protocol identifier is correct in your urls.

Nikola Despotoski
  • 49,966
  • 15
  • 119
  • 148
0

Try giving both the scheme and the host -

<data android:scheme="wizi" android:host="logout"/>
Abhinav Manchanda
  • 6,546
  • 3
  • 39
  • 46
  • thanks i have tried that, was really hoping to have multiple links with the same scheme but a different host, eg , wizi://logout, wizi://login etc – TNM Aug 24 '11 at 15:00
  • In that case, the official Android documentation says that you are allowed to use URL patterns for host including the Asterik (*). – Abhinav Manchanda Aug 24 '11 at 16:51
  • Copy pasted from the Android developers website : An asterisk ('*') matches a sequence of 0 to many occurrences of the immediately preceding character. Because '\' is used as an escape character when the string is read from XML (before it is parsed as a pattern), you will need to double-escape: For example, a literal '*' would be written as "\\*". – Abhinav Manchanda Aug 24 '11 at 16:52
  • You can read more here - http://developer.android.com/guide/topics/manifest/data-element.html – Abhinav Manchanda Aug 24 '11 at 16:52
  • this suggestion did not resolve the problem on my end. A little more info: I'm using Cordova, problem does not exist in Cordova 2.7, it does in Cordova 3.0. – silverchair Sep 16 '13 at 13:50
  • @silverchair - Could you provide a little more details about what exactly you're trying, and what is happening ? – Abhinav Manchanda Sep 17 '13 at 06:05
  • I'm creating my own url scheme, so when someone uses a link to navigate e.g. Open App it would open my Cordova app. This works in Cordova 2.7, just upgraded to Cordova 3.0 and getting the "Protocol is not supported" error referring to the wizi:// scheme. I tried your suggestion of adding android:host="*" and it did not help – silverchair Sep 17 '13 at 09:23
  • maybe you could try giving something after the scheme - something like ? – Abhinav Manchanda Sep 18 '13 at 04:08
  • yeah I have a "query string" after the URL scheme, just didn't mention it here for simplicity of the example – silverchair Oct 03 '13 at 14:59