2012-03-01 102 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