Intents are not type safe
Open
enhancement
technical debt
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
As we had this recently: https://github.com/nextcloud/android/pull/5857
To prevent this, my idea is to have a static "launch" function in ever needed activity, that handles creating the intent correctly.
In this case it could be:
```
public static function launch/createIntent(File file, Account account) {
Intent i = new Intent(fileActivity, ConflictsResolveActivity.class);
i.putExtra(ConflictsResolveActivity.EXTRA_FILE, file);
i.putExtra(ConflictsResolveActivity.EXTRA_ACCOUNT, account);
return i;
}
```
What do you think? @ezaquarii @AndyScherzinger
Contributor guide
Assessment
This issue has not been assessed yet.