Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Are you missing a call to unregisterReceiver()? #7452

Closed

Description

@DmitryTankovich
com.mapbox.mapboxsdk.net.ConnectivityReceiver@2e41666 that was originally registered here. Are you missing a call to unregisterReceiver()?
    at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:918)
    at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:719)
    at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1172)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1152)
    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1146)
    at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:554)
    at com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance(ConnectivityReceiver.java:35)
    at com.mapbox.mapboxsdk.MapboxAccountManager.start(MapboxAccountManager.java:53)

Nexus 5
Android 6.0.1
com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-beta.5@aar'

Press home -> open from recent

Activity

  1. added
    Android
    on Dec 15, 2016
  2. cammace commented on Dec 15, 2016

    @cammace
    Contributor

    Place the accountManager inside your application object similar to what we are doing inside our testapp. Once this is done, remove any account manager calls you might have inside activities. Let me know if this resolves the issue.

  3. tobrun commented on Dec 16, 2016

    @tobrun
    Member

    the underlying issue seem to starting up MapboxAccountManager with an non application context, this is something that should be enforced by the ConnectivityChangeListener, picking this up as part of a refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions