2012-03-01 122 views
1

我有像下面这样的链接。android url重定向

准确URL

<a href="activity_a://lookup/gelismeler">gelismeler</a>den 

在TextView中我启用使用上面的链接我想打开speficied活动链接。但是,我得到

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=activity_a://lookup/gelismeler (has extras) } 

我的清单XML包含以下

<intent-filter> 
         <action android:name="android.intent.action.VIEW" /> 
         <action android:name="android.intent.action.DEFAULT" /> 

         <category android:name="android.intent.category.BROWSABLE" /> 

         <data 
          android:host="lookup" 
          android:scheme="activity_a" /> 
        </intent-filter> 

所以这里有什么问题行?我怎样才能打开链接重定向到myactivityname:// functionname /参数myactivity =>功能=>与参数..

在此先感谢

编辑:ACC做出一些改变。 to @CommonsWare suggestions

回答

1

步骤#1:摆脱LOOKUP,因为没有这样的动作。

步骤2:添加<category android:name="android.intent.category.DEFAULT" />,因为我没有链接TextView使用BROWSABLE中的链接。

步骤#3:保持您的方案为小写,因为我认为这是方案的一个要求。

+0

我做了什么,你说的第一步,第二步确定。第3步好,我再次得到错误 – Yaya 2012-03-02 07:32:05