# Ada Messaging SDK — consumer R8/ProGuard rules
# These rules are automatically applied to apps that depend on messaging-android.
# Only rules strictly required for reflection/JNI are included (per Google guidance:
# https://developer.android.com/topic/performance/app-optimization/library-optimization).

# Preserve @JavascriptInterface methods — accessed via reflection by the WebView engine.
-keepclassmembers class cx.ada.messaging.AdaBridgeInterface {
    @android.webkit.JavascriptInterface <methods>;
}

# Preserve Parcelable CREATOR fields — accessed via reflection by the Android framework
# when restoring Settings from Intent extras and Fragment arguments.
-keepclassmembers class cx.ada.messaging.widget.AdaMessagingView$Settings {
    public static final ** CREATOR;
}
-keepclassmembers class cx.ada.messaging.widget.AdaMessagingView$MetaFields {
    public static final ** CREATOR;
}
-keepclassmembers class cx.ada.messaging.AdaEnvironment$* {
    public static final ** CREATOR;
}
