ParkSangGwon / TedPermission

Easy check permission library for Android Marshmallow
1.74k stars 239 forks source link

onPermissionResult Null!!! How? #55

Closed AnkurJagani closed 7 years ago

AnkurJagani commented 7 years ago

Caused by java.lang.RuntimeException: Could not dispatch event: class com.gun0912.tedpermission.busevent.TedPermissionEvent to handler [EventHandler public void com.gun0912.tedpermission.TedInstance.onPermissionResult(com.gun0912.tedpermission.busevent.TedPermissionEvent)]: null

I have given all permissions and still it generating above exception on random times. Some times its working fine. Would you please help me in same context.

AnkurJagani commented 7 years ago

Hi,

Are you maintaining this library or not? Should we look for new library or close this thread?

Thanks.

ParkSangGwon commented 7 years ago

@AnkurJagani Do you use Proguard?

AnkurJagani commented 7 years ago

@ParkSangGwon Yes i am. Please check below configuration.

buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

proguard-rules.pro

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

#-keep class com.firebase.** { *; }
#-keep class com.google.android.gms.ads.MobileAds{ *; }
#-keep class com.google.android.gms.ads.AdActivity{ *; }

-keep class org.apache.http.**{ *; }
-dontwarn org.apache.http.**

is there any problem in it?

ParkSangGwon commented 7 years ago

Please read this https://github.com/ParkSangGwon/TedPermission#proguard

-keepattributes *Annotation*
-keepclassmembers class ** {
    @com.squareup.otto.Subscribe public *;
    @com.squareup.otto.Produce public *;
}