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

MIUI 10 of Android 8.1 MIUILOG- reject service #732

Closed
DanielWu-China opened this issue Feb 21, 2019 · 6 comments
Closed

MIUI 10 of Android 8.1 MIUILOG- reject service #732

DanielWu-China opened this issue Feb 21, 2019 · 6 comments
Labels

Comments

@DanielWu-China
Copy link

2019-02-21 15:37:36.074 1856-3166/? I/AutoStartManagerService: MIUILOG- Reject service :Intent { cmp=com.xxxxxx/org.acra.sender.JobSenderService } userId : 0 uid : 10322
2019-02-21 15:37:36.075 1856-3166/? D/JobSchedulerService: Error executing JobStatus{9ef96b7 #u0a322/0 com.xxxxxxx/org.acra.sender.JobSenderService u=0 s=10322 TIME=none:-2ms READY}

When I use the version of acra-http:5.3.0-rc02 on a xiaomi note3,logged like this above.
Onlyif I turn on the app's auto run, then the SenderService can be started.
When I used the version of 4.8.5,it doesn't have this problem,but has another one : Not allowed to start service Intent { cmp=com.xxxxxx/org.acra.sender.SenderService (has extras) }: app is in background uid UidRecord{add5585 u0a65 CEM idle procs:1 seq(0,0,0). Which fixed in dev 5.1

@DanielWu-China DanielWu-China changed the title MIUI 8.1 MIUILOG- reject service MIUI 10 of Android 8.1 MIUILOG- reject service Feb 21, 2019
@Mikanoshi
Copy link

Xiaomi blocks JobScheduler by default (when autostart is off), even if app is in a foreground :)
Need to write your own ReportSender...

@F43nd1r
Copy link
Member

F43nd1r commented Mar 12, 2019

With #707 and this it looks like MIUI is just broken. I am going to close these issues, as I can't do anything when android OEMs block the APIs we use.

@DanielWu-China
Copy link
Author

Xiaomi blocks JobScheduler by default (when autostart is off), even if app is in a foreground :)
Need to write your own ReportSender...

So...brother, you must have wrote a ReportSender, can you share me one copy? My email address is: [email protected]. Thanks for your help!

@F43nd1r
Copy link
Member

F43nd1r commented Mar 19, 2019

@DanielWu-China there is no ReportSender which can wich can fix this, the problem is earlier in the chain.
You can try a SenderScheduler something like this:

public class MIUISenderScheduler implements SenderScheduler {
    private final SendingConductor sendingConductor;

    private MIUISenderScheduler(@NonNull Context context, @NonNull CoreConfiguration config) {
        sendingConductor = new SendingConductor(context, config);
    }

    @Override
    public void scheduleReportSending(boolean onlySendSilentReports) {
        sendingConductor.sendReports(onlySendSilentReports);
    }

    @AutoService(SenderSchedulerFactory.class)
    public static class Factory implements SenderSchedulerFactory {
        @NonNull
        @Override
        public SenderScheduler create(@NonNull Context context, @NonNull CoreConfiguration config) {
            return new MIUISenderScheduler(context, config);
        }
    }
}```

@DanielWu-China
Copy link
Author

mething like thi

Thanks for your replay & help!

@Mikanoshi
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants