v2.2.0 - Ouverture de l'application depuis url programmes
This commit is contained in:
@@ -215,6 +215,27 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
createDialog();
|
||||
|
||||
// ATTENTION: This was auto-generated to handle app links.
|
||||
Intent appLinkIntent = getIntent();
|
||||
String appLinkAction = appLinkIntent.getAction();
|
||||
Uri appLinkData = appLinkIntent.getData();
|
||||
handleIntent(getIntent());
|
||||
}
|
||||
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
handleIntent(intent);
|
||||
}
|
||||
|
||||
private void handleIntent(Intent intent) {
|
||||
String appLinkAction = intent.getAction();
|
||||
Uri appLinkData = intent.getData();
|
||||
if (Intent.ACTION_VIEW.equals(appLinkAction) && appLinkData != null){
|
||||
String recipeId = appLinkData.getLastPathSegment();
|
||||
Uri appData = Uri.parse(URL_PLATEFORM).buildUpon()
|
||||
.appendPath(recipeId).build();
|
||||
web.loadUrl(URL_PLATEFORM + appLinkData.getPath());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onCreateOptionsMenu(Menu menuOpt) {
|
||||
|
||||
Reference in New Issue
Block a user