Skip to content

crash without setpackage #1

@flankechen

Description

@flankechen

thanks for the code tutorial, but git clone and run makes a crash like: "Service Intent must be explicit:",

I fix this with setpackage in bindservice like

    @Override
    protected void onStart() {
        super.onStart();
        bindService(new Intent("app.mabel.com.testservice.MySimpService").setPackage("app.mabel.com.testservice"),this,BIND_AUTO_CREATE);
        bindService(new Intent("app.mabel.com.testservice.AsyncService").setPackage("app.mabel.com.testservice"),con,BIND_AUTO_CREATE);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions