2017-08-04 99 views
0

我需要打開特定頁面重定向到特定的URL。重定向到非http/https協議的頁面

它的URL看起來(它的Android設備上正常打開): intent://details?id=...&url=https://...&referrer=...#Intent;scheme=market;action=android.intent.action.VIEW;package=com.android.vending;end

我嘗試onActivatenew URL()回報,但得到的錯誤unknown protocol intent。然後我嘗試返回url作爲字符串,也得到錯誤。

我該如何解決我的問題?

回答

0

我創建自定義URLStreamHandlerFactory並將其設置爲URL.setURLStreamHandlerFactory。現在我可以用我的具體網址創建網址