GMapsParser icon indicating copy to clipboard operation
GMapsParser copied to clipboard

support android 12

Open TheMERCYcode opened this issue 3 years ago • 2 comments

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

TheMERCYcode avatar Nov 21 '22 11:11 TheMERCYcode

@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 avatar Jun 07 '23 06:06 darekbx

@3v1n0 @szwajda I created PR with fix: https://github.com/3v1n0/GMapsParser/pull/8

darekbx avatar Jun 07 '23 07:06 darekbx