v2.2.0 - Ouverture de l'application depuis url programmes
This commit is contained in:
parent
16f755d564
commit
f191f2bdc2
@ -23,8 +23,8 @@ android {
|
||||
applicationId "fr.svpro.radiomercure"
|
||||
minSdk 26
|
||||
targetSdk 33
|
||||
versionCode 211
|
||||
versionName '2.1.1'
|
||||
versionCode 220
|
||||
versionName '2.2.0'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@ -36,17 +37,29 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.NavigationDrawer.NoActionBar">
|
||||
|
||||
<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="https"
|
||||
android:host="podcast.radiomercure.fr"
|
||||
android:pathPrefix="/@" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".MailActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
<service android:name=".MediaPlayerService" />
|
||||
<service android:name=".NotificationsService" android:exported="true">
|
||||
<service
|
||||
android:name=".NotificationsService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user