Mobile First WL.Client.Push.onReadyToSubscribe not getting fired - ibm-mobilefirst

While trying to subscribe new ios device to Mobile first push notification using hybrid application , function WL.Client.Push.onReadyToSubscribe not getting fired
any help ?

Please apply this sample and see if the same issue is occurring.
If you still cannot subscribe, please provide xcode logs.
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/notifications/push-notifications-overview/push-notifications-native-ios-applications/event-source-based-notifications-in-native-ios-applications/

fixed , while checking native code , i found didRegisterForRemoteNotificationsWithDeviceToken method is exits which override WL registration process
just i removed it and it is working ok with me

Related

OnNotification() function dosen't work when i send localNotification

I am using react-native-push-notification to implement push notifications, I have followed the documentation properly when I send remote notification OnNotification() get called properly but when I send LocalNotification using PushNotification.LocalNotification() I get proper notification pop-up but it doesn't trigger OnNotification() function, I have gone through lot of stackoverflow questions and git issue still no solution, can anyone have solution have on this issue that would be great help
For ios this method will trigger/callback when you click on the notification and launch the app from killed state
PushNotificationIOS.getInitialNotification().then(notification => {
if (!notification) {
return;
}
});
I just implemented and tested in release mode, it worked well. For Andriod i'm still figuring it out which method triggers the call back in killed state.
Note: Above code works only in release mode for iOS.

How to open app from Recently open apps in android device using Appium?

I have tried the following code for the above mentioned problem,
driver.pressKey(new KeyEvent().withKey(AndroidKey.APP_SWITCH));
//Code for swipe left
((AndroidDriver) driver).startActivity(new Activity(ANDROID_PACKAGE, ANDROID_STARTACTIVITY));
//user you application package name and activity for start application
When I switch between applications my previous application gets restart. Could anyone please help me to stop this restart.
Key presses on appium are done by
driver.press_keycode(code)
All required codes can be found here
187 - KEYCODE_APP_SWITCH
So in your case,
The final code would be like,
driver.press_keycode(187) - KEYCODE_APP_SWITCH

Recording Crash using Crashlytics AFTER overridin JSExceptionHandler (React Native)_

I'm using Crashlytics (Natively) in React Native.
In RN, I'm overriding the JSExceptionHandler to use NativeModules and call out to my MyCrashHandler.
MyCrashHandler does the with Crashlytics reportError.. but this is only good if I THEN have a crash.
I can't have a Crashlytics crash because I already overrode the JSExceptionHandler.
How do I force Crashlytics to send my events? Maybe I need to use Firebase logging instead?
You don't have to wait for a crash to know that Crashlytics is working. You can use the SDK to force a crash by adding the following code to your app
Button crashButton = new Button(this);
crashButton.setText("Crash!");
Also, you can use your own API like this:
Fabric.with([Crashlytics.start(withAPIKey: "YOUR_API_KEY")]
You can write your own custom crash report by writing code in native iOS and Android. Please check the following the link for it.
https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=ios

selecting react native push notification

I am using react native and trying to add push notification.
My application need push notification because of chatting. I just need push notification to appear whenever the user receives chat message.
I've searched couple of libraries about push notification and found out firebase and react-native-push-notification.
Which one is proper library for this case and please tell me if there is other better way to solve this problem.
We're using invertase firebase notification library which is working so far better without any issues.
You'll get almost all the options which you needed for push notification customization like badges, etc.

Worklight persistent busy indicator

I'm working on a project using IBM Worklight and any time I build and deploy my project on any simulator or device, I have this busy indicator spinner in the middle of the screen. Its always there, on every page and its there in the ios, windows, web and android simulators as well as one android device we've tested on. Has anyone seen this before and if so how would I get rid of it.
Jquery-mobile was the problem, it was continuously displaying the indicator for seemingly no good reason. Deleting Jquery mobile fixed the problem
I already used the native worklight loading.It is very good and I tested it on different platforms, devices. But it is necessary to close it when you leave the function that opened it.
Example:
var busyInd = new WL.BusyIndicator ("content", {text: "Please wait..."});
function consult(){
busyInd.show();
//impl
busyInd.hide();
}