Update Android PN integration fixes (#15541)
* Add missing android payload attributes * Fix click_action in Android PN payload * Native bridge fixes to interact with PN + Podcast + Video features
This commit is contained in:
parent
105086f976
commit
6b5d511ea0
3 changed files with 9 additions and 4 deletions
|
|
@ -32,8 +32,6 @@ function callInitializers() {
|
|||
initializeCreditsPage();
|
||||
initializeProfileInfoToggle();
|
||||
initializeProfileBadgesToggle();
|
||||
initializePodcastPlayback();
|
||||
initializeVideoPlayback();
|
||||
initializeDrawerSliders();
|
||||
initializeHeroBannerClose();
|
||||
initializeOnboardingTaskCard();
|
||||
|
|
@ -58,6 +56,8 @@ function initializePage() {
|
|||
if (document.getElementById('sidebar-additional')) {
|
||||
document.getElementById('sidebar-additional').classList.add('showing');
|
||||
}
|
||||
initializePodcastPlayback();
|
||||
initializeVideoPlayback();
|
||||
}
|
||||
}, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ export function foremMobileNamespace() {
|
|||
try {
|
||||
if (Runtime.isNativeIOS(namespace)) {
|
||||
window.webkit.messageHandlers[namespace].postMessage(message);
|
||||
} else if (Runtime.isNativeAndroid(namespace)) {
|
||||
} else if (Runtime.isNativeAndroid(`${namespace}Message`)) {
|
||||
AndroidBridge[`${namespace}Message`](JSON.stringify(message));
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,12 @@ class Device < ApplicationRecord
|
|||
n.registration_ids = [token]
|
||||
n.priority = "high"
|
||||
n.content_available = true
|
||||
n.notification = { title: title, body: body }
|
||||
n.notification = {
|
||||
title: title,
|
||||
body: body,
|
||||
sound: "default",
|
||||
click_action: ".presentation.home.HomeActivity"
|
||||
}
|
||||
n.data = { data: payload }
|
||||
n.save!
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue