|
|
@ -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) { |
|
|
|