Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Missing DeepLinks #12820

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ android {
}

defaultConfig {
applicationId "com.nextcloud.client"
minSdkVersion 24
targetSdkVersion 34
compileSdk 34
Expand Down
77 changes: 72 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,26 +148,93 @@
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<intent-filter>

<meta-data
android:name="android.app.searchable"
android:resource="@xml/users_and_groups_searchable" />

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

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

<data android:scheme="http" />
<data android:host="*" />
<data android:pathPattern="/f/..*" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

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

<data android:scheme="http" />
<data android:host="*" />
<data android:pathPattern="/..*/f/..*" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

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

<data android:scheme="http" />
<data android:host="*" />
<data android:pathPattern="/..*/..*/f/..*" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

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

<data android:scheme="http" />
<data android:host="*" />
<data android:pathPattern="/..*/..*/..*/f/..*" />
</intent-filter>
<intent-filter android:autoVerify="true">
<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" />
<data android:host="*" />
<data android:pathPattern="/f/..*" />
</intent-filter>
<intent-filter android:autoVerify="true">
<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" />
<data android:host="*" />
<data android:pathPattern="/..*/f/..*" />
</intent-filter>
<intent-filter android:autoVerify="true">
<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" />
<data android:host="*" />
<data android:pathPattern="/..*/..*/f/..*" />
</intent-filter>
<intent-filter android:autoVerify="true">
<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" />
<data android:host="*" />
<data android:pathPattern="/..*/..*/..*/f/..*" />
<!-- path pattern to handle deep link -->
<data android:pathPattern="/app/..*" />
</intent-filter>

<meta-data
android:name="android.app.searchable"
android:resource="@xml/users_and_groups_searchable" />
</activity>
<activity
android:name=".ui.activity.ManageAccountsActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import android.os.Environment;
import android.os.IBinder;
import android.os.Parcelable;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuInflater;
Expand Down Expand Up @@ -516,7 +517,8 @@ protected void onNewIntent(Intent intent) {
} else if (RESTART.equals(intent.getAction())) {
finish();
startActivity(intent);
} else // Verify the action and get the query
} else {
// Verify the action and get the query
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
setIntent(intent);

Expand Down Expand Up @@ -558,7 +560,10 @@ protected void onNewIntent(Intent intent) {

setLeftFragment(new GroupfolderListFragment());
getSupportFragmentManager().executePendingTransactions();
} else {
handleOpenFileViaIntent(intent);
}
}
}

private void onOpenFileIntent(Intent intent) {
Expand Down Expand Up @@ -2315,7 +2320,6 @@ protected void onDestroy() {
@Override
protected void onRestart() {
super.onRestart();

checkForNewDevVersionNecessary(getApplicationContext());
}

Expand Down