Thank you Uldis,
this exactly what i did ( was posting when you sent this :).
After a lot of issue , i could finally solve it by modifying Fuse.pushNotification Package .
unfortunately modifications on Package source was not reflected in my build ( Impl.uno
).
so i ended with modifying the generated AndroidImpl.Java
and now even if push notification payload have title and body outside of aps or notification then it is going to show in notifications bar ( android )
public static void OnNotificationRecieved(final Object listener,final String from,final Object _bundle)
{
final Bundle bundle = (Bundle)_bundle;
if (!PushNotificationReceiver.InForeground) {
String notification = bundle.getString("notification");
String aps = bundle.getString("aps");
String UA = bundle.getString("com.urbanairship.push.ALERT");
String _title = bundle.getString("title");
String _body = bundle.getString("body");
if (notification != null) {
// using the google style 'notification' subtree
com.foreign.Fuse.PushNotifications.AndroidImpl.NotificationFromJson434(listener, notification, bundle);
} else if (aps != null) {
// using the apple style 'aps' subtree
com.foreign.Fuse.PushNotifications.AndroidImpl.NotificationFromJson434(listener, aps, bundle);
} else if (UA!=null){
// using the apple style UA
if(_body!=null){
com.foreign.Fuse.PushNotifications.AndroidImpl.SpitOutNotification435(listener,UA, _body, "", "", "", "", "", bundle);
}else{
com.foreign.Fuse.PushNotifications.AndroidImpl.SpitOutNotification435(listener,UA, "", "", "", "", "", "", bundle);
}
}else if(_title!=null){
// Add General Support to Title and body
if(_body!=null){
com.foreign.Fuse.PushNotifications.AndroidImpl.SpitOutNotification435(listener,_title, _body, "", "", "", "", "", bundle);
}else{
com.foreign.Fuse.PushNotifications.AndroidImpl.SpitOutNotification435(listener,_title, "", "", "", "", "", "", bundle);
}
}else {
com.foreign.Fuse.PushNotifications.AndroidImpl.cacheBundle424(bundle);
}
} else {
ExternedBlockHost.callUno_Fuse_PushNotifications_AndroidImpl_OnRecieve429((Object)bundle,(boolean)false,UnoHelper.GetUnoObjectRef((Object)bundle));
}
}
and having simple script to copy my modified version and rebuild mybuild.sh
uno clean
uno build --target=Android -DGRADLE --configuration=Release
cp android_build/AndroidImpl.txt "${PWD}"/build/Android/Release/app/src/main/java/com/foreign/Fuse/PushNotifications/AndroidImpl.Java
sh "${PWD}"/build/Android/Release/build.sh
i know it is going to break in way or another as it seems the generated Java file has functions name with generated numbers .
FuseTeam could you confirm if we as users can modify the code of source package ? (Impl.uno) inside pushNotification for example