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

support android 12 #7

Open
TheMERCYcode opened this issue Nov 21, 2022 · 2 comments
Open

support android 12 #7

TheMERCYcode opened this issue Nov 21, 2022 · 2 comments

Comments

@TheMERCYcode
Copy link

Hi 3v1n0,

I am trying to use this for a hobby project. But I am not able to get it working in android 12 .
I am try approx. all method but those method does not work
Could you please provide help

@darekbx
Copy link

darekbx commented Jun 7, 2023

@3v1n0 I have a fix for Android 12.

Fix is using System UI package name for getting app context. Change is quite simple, just replace initialisation of mAppSrcCx in NavigationNotification class:

    protected var mAppSrcCx: Context = mCx.createPackageContext(
        if (Build.VERSION.SDK_INT >= 31) "com.android.systemui" else sbn.packageName,
        Context.CONTEXT_IGNORE_SECURITY,
    )

CC @akku7239

darekbx pushed a commit to darekbx/GMapsParser that referenced this issue Jun 7, 2023
@darekbx
Copy link

darekbx commented Jun 7, 2023

@3v1n0 @szwajda I created PR with fix: #8

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

No branches or pull requests

2 participants