2017-11-30 16 views
0

AppAuth를 사용하여 webview에서 앱으로 리디렉션 처리 문제가 있습니다. 나는 계속 net :: ERR_UNKNOWN_URL_SCHEME을 얻는다. 내 build.gradle에서 나는 defaultConfigAppAuth 알 수없는 URL 스키마

manifestPlaceholders= [ 
    'appAuthRedirectScheme': 'com.example.mc2017' 
] 

매니페스트 자리를 선언 매니페스트에 나는 com.example.mc2017 내가가 듣고있어 계획해야

<activity android:name="net.openid.appauth.RedirectUriReceiverActivity"> 
    <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="com.example.mc2017"/> 
    </intent-filter> 
</activity> 

RedirectUriReceiverActivity

을 얻었다. 누구가 저에게 실수가 어디 있는지 가르쳐 주시겠습니까?

답변

0

1- placeHolders에 ${...} 스키마를 사용해야하지만 어쨌든 매니페스트에 자리 표시자를 사용하지 않아야합니다.

당신이이 경우에 예를 myApp://com.example.mc2017에 대한 귀하의 URL에 대한 스키마를 사용할 수 있습니다

2 는이처럼 될 매니페스트 :

<activity android:name="net.openid.appauth.RedirectUriReceiverActivity"> 
    <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:host="com.example.mc2017" 
     android:scheme="myApp"/> 
    </intent-filter> 
</activity>