2017-06-02 1 views
0

lorsque je clique sur un AppLink, je dois choisir le chrome ou mon applicationAppLinks pour Android

enter image description here

I Vérifiez mon site Google Statement List Generator and Tester je suis arrivé ci-dessous

Success! Host XXX grants app deep linking to XXX. 

Mais adb shell dumpsys package domain-preferred-apps affiche

"Status: undefined" 

Quelqu'un sait comment résoudre ce problème?

Manifest.xml `

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

      <data 
       android:scheme="https" 
       android:host="XXXX.XX" 
       android:path="/test" /> 
     </intent-filter>` 

le statut de applinks n'est pas "toujours" comment faire ??? droite

"Status: undefined" 
+0

Utilisez-vous ActivityChooser dans notre code? –

+0

no. Je veux le faire quand je clique sur le lien html mon lancement de l'application Android –

Répondre

0

mettre ce code sur TextView onClick Listener ..

String urlString="http://www.google.com"; 
Intent intent=new Intent(Intent.ACTION_VIEW,Uri.parse(urlString)); 
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
intent.setPackage("com.android.chrome"); 
try { 
context.startActivity(intent); 
} catch (ActivityNotFoundException ex) { 
// Chrome browser presumably not installed so allow user to choose instead 
intent.setPackage(null); 
context.startActivity(intent); 

}

+0

Ceci est une page Web, pas dans mon application –

+0

alors vous ne devriez pas taguer Andorid .. –

+0

La question est comment configurer mon application android !!! la page Web est correcte. –

0

Pour éviter de voir le chooser, vous devez configurer Verified App Links. Voir here pour les instructions

+0

J'ai fait toutes les étapes, mais le sélecteur est toujours là –