diff --git a/modules/juce_gui_basics/native/juce_android_Windowing.cpp b/modules/juce_gui_basics/native/juce_android_Windowing.cpp index 4cb678ad3b..42dde15658 100644 --- a/modules/juce_gui_basics/native/juce_android_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_android_Windowing.cpp @@ -1667,4 +1667,25 @@ const int KeyPress::stopKey = extendedKeyModifier + 46; const int KeyPress::fastForwardKey = extendedKeyModifier + 47; const int KeyPress::rewindKey = extendedKeyModifier + 48; +//============================================================================== +struct JuceActivityNewIntentListener +{ + #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ + CALLBACK (appNewIntent, "appNewIntent", "(Landroid/content/Intent;)V") + + DECLARE_JNI_CLASS (JavaActivity, JUCE_PUSH_NOTIFICATIONS_ACTIVITY) + #undef JNI_CLASS_MEMBERS + + static void JNICALL appNewIntent (JNIEnv*, jobject /*activity*/, jobject intentData) + { + #if JUCE_PUSH_NOTIFICATIONS && JUCE_MODULE_AVAILABLE_juce_gui_extra + juce_handleNotificationIntent (static_cast (intentData)); + #else + juce::ignoreUnused (intentData); + #endif + } +}; + +JuceActivityNewIntentListener::JavaActivity_Class JuceActivityNewIntentListener::JavaActivity; + } // namespace juce diff --git a/modules/juce_gui_extra/native/juce_android_PushNotifications.cpp b/modules/juce_gui_extra/native/juce_android_PushNotifications.cpp index e108081ee0..ae2f503f79 100644 --- a/modules/juce_gui_extra/native/juce_android_PushNotifications.cpp +++ b/modules/juce_gui_extra/native/juce_android_PushNotifications.cpp @@ -1645,25 +1645,4 @@ bool juce_handleNotificationIntent (void* intent) return false; } -//============================================================================== -struct JuceActivityNewIntentListener -{ - #define JNI_CLASS_MEMBERS(METHOD, STATICMETHOD, FIELD, STATICFIELD, CALLBACK) \ - CALLBACK (appNewIntent, "appNewIntent", "(Landroid/content/Intent;)V") - - DECLARE_JNI_CLASS (JavaActivity, JUCE_PUSH_NOTIFICATIONS_ACTIVITY) - #undef JNI_CLASS_MEMBERS - - static void JNICALL appNewIntent (JNIEnv*, jobject /*activity*/, jobject intentData) - { - #if JUCE_PUSH_NOTIFICATIONS && JUCE_MODULE_AVAILABLE_juce_gui_extra - juce_handleNotificationIntent(static_cast(intentData)); - #else - juce::ignoreUnused(intentData); - #endif - } -}; - -JuceActivityNewIntentListener::JavaActivity_Class JuceActivityNewIntentListener::JavaActivity; - } // namespace juce