flutter - FCM: custom vibration on iOS - ios

I wrote an app that should notify people if something happend. Because of that it is important, that the people hear the notification. i have chosen flutter to develop parallel for android and ios. For android I have now got everything done.
For iOS I have been able to get my own sound on notifications.
But I don't found a solution how I can set my own vibration.
Do either of you know how I can set a vibration other than the short twitch?
I used the tutorial from firebase_messaging on flutter.io and set the sound during the notification rest call on the server.
If you want to see the source code, I can add it.
I thank you in advance for your support.
Kai

Related

React Native - IOS Platform — How to bring App in focus / foreground from background on receiving Push Notification

I am using OneSignal to send Push Notifications to my React Native App. On receiving notification I bring up a Custom React Native screen to take some input from User.
I followed the instructions mentioned here:
https://documentation.onesignal.com/docs/react-native-sdk
https://documentation.onesignal.com/docs/react-native-sdk-setup
The above two guides mainly explains how to Initialize OneSignal, setup notification listeners and other required Native settings.
After the above configuration I am able to send Notification (and bring up the Custom Screen) to App on iPhone but only if App is in Foreground. The App was not receiving notification if in Background.
Then I followed the below article by Oleg Kalyta and configured:
https://hackernoon.com/complete-guide-receive-push-notifications-in-react-native-ios-app-38b1ec5b1b15
It explains how to configure PushNotificationIOS RN package and setup some more functions and listeners. Though I don’t quite understand why I need these functions if I have already configured OneSignal listeners. And how it will impact on my App’s performance with too many listeners.
After this configuration I am able to receive notification (it comes at top of iPhone and goes away after 2-3 seconds) even if the App is in Background. But it does not bring my App in Focus and does not show Custom screen.
I am looking for help to resolve the issue and show the Custom screen if App is in Background and it receives notification.
Interestingly the OneSignal listeners are getting called and I am also able to see the sent data in the logs but I am not sure how to bring up the IOS App in focus.
In Android I am able to even unlock the phone and bring the App in focus on receiving notification. I have written some Android Native code using Android PowerManager and WindowManager packages. I am calling this native code from my React Native OneSignal listener to Wake up the phone and bring the App in focus and display the custom screen.
The same thing I am trying to achieve in IOS.
Please can anyone help. I have gone through lot of articles on Net but I am not able to find any solution.

VoIP and Callkit framework audio issue

I am using VoIP Push and Callkit Framework for audio and video call feature in my app. I am able to display incoming call screen when app is in background mode.
I am facing one issue, that is when I answer the call, I am hearing my own voice again from device speaker.So please help me to resolve this issue.
I checked with the Speakerbox sample app given by apple developer, It that also same thing happening.
Thanks in advance.
The issue could be the setup of the IOUnit in AudioController.mm.
Check my answer here: https://stackoverflow.com/a/42034409/3990192

Iphone SDK Disable Notifications of Another App

I am writing a simple app (For personal use only) that needs to disable the text message notifications. I am open to how to go about this (disable push notifications of imessage, mute phone, etc.) but everything I read says that apple does not allow an app to modify the user settings. I know there has to be a way to do this, but I have hit a dead end. Does anyone have any suggestions?
Apple doesn't allow this though any official SDK methods.

Option to play a notification sound iOS

I wrote an Android application and it had options to choose what system notification sound the user wanted to play for each of the different types of notifications, three in total.
Now I want to write the same application for iOS, but is it possible to do this in iOS, I Googled about this but didn't really find a way on how to do it. Seeing as though iOS 7 is out, have Apple made any changes?
Or is it still restricted, like a million other things?
Choose custom sound for local notifications
This link provides the answer. You can find more detail in the apple doc. "In iOS, an application can specify a sound file along with an alert message or badge number.".
Specifically:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW1
Ok, I have downloaded the standard iOS 7 alert sounds, and will put them in my bundle, and play them from there. Why does Apple make things so hard?

What's solution to make task background in iOS same service in Android?

I'm newbie iOS. I have been develop Phonegap for Android and iOS. My App is update data from server every 1hour. In Android, i use service to do that. My app in Android working very good. Now, i want to develop version for iOS, and i have problem when update data from server every 1hour. I was research but not find anyway for my app.I don't know what's solution to replace for service in Android. Can you help me, what's solution. This have been kill me. Thank you so much.
Short answer is NO as Apple has restriction on background task running especially cases like yours.
But if you are downloading small amount of content, you do have some other options. From IOS 4.0 or above, you can declare your app to run in background when you fall under the following categories:
Audio
Location updates
Voice over IP
Newsstand downloads
External accessory communication
Bluetooth networking
Bluetooth data sharing
Background fetch (IOS 7)
Remote notifications (IOS 7)
In order to do so, you need to flag your app in the info.plist for Required Background Modes option. Apple will review your app specific in this area once you declared the option.
For your case to download the data, the possible option is to use the new feature in IOS 7 that's the background fetch or remote notification above. The suggestion from DOM was not asking you to download the content through push notification. But instead to use push notification to wake up your application and start downloading new content.
If you don't want to use push notification, the only way to go is register for background fetch. However, no matter which option you want to use, each download will only last for 30 seconds. And after that, your app will put into suspension mode again.
you can have a look on the link here:
Declaring Your App’s Supported Background Tasks
I think your best bet would be to use the push services instead of having your app go get data. Making your app do it is unreliable with phonegap apps because you cant create a service interface and you can not guarantee that your app will be running. With push service though, if your app isn't running, it will be woken up in a manner of speaking.
Take a look at this great how-to article that also discusses what push provides you.

Resources