mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-08 04:20:09 +00:00
Android: Fixed compile error when push notifications are disabled
This commit is contained in:
parent
2ef9899818
commit
bd86eb667e
1 changed files with 14 additions and 16 deletions
|
|
@ -1668,24 +1668,22 @@ 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")
|
||||
#ifdef JUCE_PUSH_NOTIFICATIONS_ACTIVITY
|
||||
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
|
||||
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<void*> (intentData));
|
||||
#else
|
||||
juce::ignoreUnused (intentData);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
static void JNICALL appNewIntent (JNIEnv*, jobject /*activity*/, jobject intentData)
|
||||
{
|
||||
juce_handleNotificationIntent (static_cast<void*> (intentData));
|
||||
}
|
||||
};
|
||||
|
||||
JuceActivityNewIntentListener::JavaActivity_Class JuceActivityNewIntentListener::JavaActivity;
|
||||
JuceActivityNewIntentListener::JavaActivity_Class JuceActivityNewIntentListener::JavaActivity;
|
||||
#endif
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue