bluelinelabs / bluelinelabs/Conductor
startIntentSenderForResult is marked @TargetApi(Build.VERSION_CODES.N)
- Dominant language
- Java
- Stars
- 3.9k
- Forks
- 338
- PR merge metrics
- No merged PRs in 30d
Description
`startIntentSenderForResult` is marked `@TargetApi(Build.VERSION_CODES.N)` but it was added in API 16. This is a bug.
When I try to use `startIntentSenderForResult` on API 21 I get a crash:
```
Caused by: java.lang.NoSuchMethodError: No virtual method startIntentSenderForResult(Landroid/content/IntentSender;ILandroid/content/Intent;IIILandroid/os/Bundle;)V in class Lcom/bluelinelabs/conductor/internal/LifecycleHandler; or its super classes (declaration of 'com.bluelinelabs.conductor.internal.LifecycleHandler' appears in /data/app/com.folx.driver.debug-2/base.apk:classes21.dex)
at com.bluelinelabs.conductor.internal.LifecycleHandler.startIntentSenderForResult(LifecycleHandler.java:306)
at com.bluelinelabs.conductor.ActivityHostedRouter.startIntentSenderForResult(ActivityHostedRouter.java:95)
at com.bluelinelabs.conductor.Controller.startIntentSenderForResult(Controller.java:533)
```
Maybe @PaulWoitaschek will know as he's the one who added this method.
Contributor guide
Research direction
Start in com/bluelinelabs/conductor/internal/LifecycleHandler.java around line 306, then trace the calls through ActivityHostedRouter.java and Controller.java shown in the stack trace. Verify the API-level annotation and method availability against Android API 16 and API 21, and confirm that the reported invocation no longer produces the NoSuchMethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100