Skip to content

Commit

Permalink
Mention android:taskAffinity activity property in Android example (#521)
Browse files Browse the repository at this point in the history
* Update README.md & AndroidManifest.xml
  • Loading branch information
tiberiusteng authored Mar 19, 2024
1 parent 98daa3d commit ef82f15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ Use your Dropbox APP Key in place of `dropboxKey` below. You need to add the `A
</manifest>
```

Your activity starting the authorization flow should also configured with `android:launchMode="singleTask"`. Also, if that activity is configured with `android:taskAffinity`, then the `AuthActivity` should also configured with the same task affinity, such that authorization result can be passed back to your activity.

🚨[There is a known issue regarding apps with `targetSdk=33` regarding app-to-app authentication when the Dropbox App is installed](https://github.com/dropbox/dropbox-sdk-java/pull/471) 🚨
A fix is being worked on and will be released in an upcoming version of the Dropbox Mobile App.

Expand Down
5 changes: 4 additions & 1 deletion examples/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
android:exported="true"
android:configChanges="orientation|keyboard"
android:launchMode="singleTask">
<!-- Your activity starting authorization flow should also configured with android:launchMode="singleTask".
If that activity is configured with android:taskAffinity, this AuthActivity should also configured
with the same android:taskAffinity so the auth result can be correctly passed back. -->
<intent-filter>
<data android:scheme="db-${dropboxKey}" />

Expand Down Expand Up @@ -66,4 +69,4 @@
android:resource="@xml/provider_paths" />
</provider>
</application>
</manifest>
</manifest>

0 comments on commit ef82f15

Please sign in to comment.