how can i disable the alert box when the app is in opened and just show them as push notifications like when the app is closed? Thanks.
Hi, you can look at the readme file here.
OneSignal.inFocusDisplaying(2);
self.oneSignal = [[RCTOneSignal alloc] initWithLaunchOptions:launchOptions
appId:@"YOUR APP ID"
settings:@{kOSSettingsKeyInFocusDisplayOption : @(OSNotificationDisplayTypeNotification), kOSSettingsKeyAutoPrompt : @YES}];
@ccoeder may you please share updated link. The docs don't seem to be there anymore.
@Noitidart oh, they changed the readme file. I found the old version here.
Thanks very much for such a fast reply @ccoeder !! I'll check that out. I'll also look out for updated docs, in case stuff changed.
Please can i use the code for android?
@hemanowell Have you tried this one? OneSignal.inFocusDisplaying(2);
Most helpful comment
Hi, you can look at the readme file here.
Android:
OneSignal.inFocusDisplaying(2);IOS: