pushkit | required components to set up independent web push | Notification library
kandi X-RAY | pushkit Summary
kandi X-RAY | pushkit Summary
All the required components to set up independent web push notifications
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pushkit
pushkit Key Features
pushkit Examples and Code Snippets
Community Discussions
Trending Discussions on pushkit
QUESTION
Recently I've added HMS PushKit SDK with this gradle code:
...ANSWER
Answered 2021-Jan-31 at 09:17android.permission.REQUEST_INSTALL_PACKAGES is a permission that allows a framework or a component on Android, to refer to an external (maven most often) repository, in order to minimise the final installation apk size for the end user by installing source code remotely, instead of packaging it all inside the same apk (for initial download).
Be careful with this permission, because if it is enabled, not on your app, but rather a dependency, it will be rejected. This is because if there are any security issues with your dependency, there is no way for google to pick this up, when you upload the app bundle onto the store. This is because of a remote download of the source code, instead of it being packaged inside the same apk that google can strip.
As a result google will not accept this apk, and it will be rejected (just because google does not know, and has no way of knowing if there is any malicous code being included in the final end user package).
You can try to fork this library, and remove the permission from the manifest, but then you will encounter missing method exceptions.
Your best bet in this case is to find another library that does not install extra source code from a remote maven repository, in order to avoid a google play store rejection.
Looking at this package, it looks like it's an SDK built on top of the Android SDKs. If there is a way for you to get around this, and work directly on the google android sdk, while also making it so the customer does not notice, then that should be fine. At the end of the day the customer does not care how you do it, as long as it works.
QUESTION
ANSWER
Answered 2021-Mar-18 at 02:22UPDATE
"code": "80200001"
It's recommended that you check your appid in the URL.
This error code is usually caused by the appid in your URL is different from the appid used to obtain the access_token, or the appid has no permission.
QUESTION
I use cURL
to send pushkit notifications to Apple. My Rails code looks like this:
curl --http2 -v -d '#{payload.to_json}' --cert #{pem} #{pushkit_base_uri}/#{registration_id}
Since 19th Jan, 20201, running this command on Ubuntu has been returning the following:
...ANSWER
Answered 2021-Feb-08 at 09:18Scroll to end for TLDR;
By running awk -v cmd='openssl x509 -noout -subject' '/BEGIN/{close(cmd)};{print | cmd}' < /etc/ssl/certs/ca-certificates.crt | less
we are able to view a list of all authorities trusted by our OS.
QUESTION
I have an already existing flutter app that uses firebase auth, MLVision for face recognition and cloud messaging for push notification. I'm using flutter. My problem now is how to integrate Huawei auth. I'm new with this huawei integration. I haven't tried it yet, I just want to know before starting.
From what I've read from some post. I need to integrate Huawei Mobile Services (HMS), Huawei Account Kit and AppGallery Connect Auth Service. For non huawei phone with google services, I can authenticate using both firebase and huawei auth with different button right? But how about huawei phones without google services?
- How will the app know? So it can hide the firebase login or run huawei only scripts for authenticaion?
- MLVision needs google play services. Is there the same for huawei kit?
- If its a large revision of code, will it be easier to create the app only for huawei phone with HMS, auth, Pushkit and with no google services script.
ANSWER
Answered 2021-Feb-03 at 01:35How will the app know? So it can hide the firebase login or run huawei only scripts for authenticaion?
You can refer this plug-in:https://pub.dev/packages/google_api_availability
The HMS will also provide a plug-in for determining the availability of the HMS in the near future. You can also use the plug-in at that time.
MLVision needs google play services. Is there the same for huawei kit?
The ML Kit of the HMS also provides the facial recognition function.
For the FLutter platform, pls kindly refer the following link:https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/body-related-services-0000001074129424?ha_source=hms1
If its a large revision of code, will it be easier to create the app only for huawei phone with HMS, auth, Pushkit and with no google services script.
The HMS plug-in interface is not mapped to the GMS interface, and the implementation logic is different. Therefore, one-to-one mapping cannot be implemented. Many kits are involved,so the compatibility development will change greatly. You are advised to develop it separately to improve efficiency.
QUESTION
I removed the all gms related apis and added hms ones. My debug version is working awesome, I have the agconnect file in my project root. But If I download my app directly from appGallery, my hms core related apis are not working. (like pushkit and iap). I checked the console when my app's release version is running and I saw this error:
...ANSWER
Answered 2021-Jan-27 at 08:11The 6003 error is caused by inconsistent certificate fingerprint configurations. Check the following items:
Ensure that the certificate fingerprint has been configured, and the certificate for packing the signature on the local client is the same as the certificate for configuring the fingerprint in AppGallery Connect. Generating Signing Certificate
Check the fingerprint entries in the certificate. It is recommended that you use a single entry.
If the 6003 error persists when you run the local client after the fingerprint is configured, the debug certificate is running by default. You need to manually go to Settings > Apps > Apps > Search (HUAWEI Mobile Services) to clear the cache and data, close the app, and try again.
QUESTION
I working on a video call application in iOS Swift 5, where call can only initiate from the backend web app and the mobile app can only answer to those calls,. Means there is no mobile-mobile communication, communication between web app and mobile app. In my application I'm using PushKit with CallKit for notifying the incoming call in the background or killed state. So in the background or killed state, if I get an incoming call, it will show the calling screen using CallKit and if I pressed Answer button, it will navigate to my own custom video call screen where I have end button for dismissing the call. But when I press the end button, the VoIP call get disconnected. But the CallKit call is not dismissing(Still show the green bar on the top of Homescreen). And I checked for how ending the CallKit call via code, but in most of the solution the CallKit is dismissing with the use of callUUID. But I don't know from where I will get that UUID. In some code I saw the UUID is received from the push payload, but in my case the call is initiated from the web app, so I'm not receiving the caller UUID. Please help me. This is my code,
...ANSWER
Answered 2020-Nov-04 at 19:09The uuid value is one that you provide.
You are providing it here:
QUESTION
I'm working on an iOS swift project in which I need to integrate video call and chat using WebRTC and PubNub, I'm using PubNubSwift', '~> 3.0.1 SDK for PubNub. I have integrated the video call and chat in foreground state. But I want to notify users when receiving a call in background or killed state. And for push notification, the backend team is using pubnub. So In PubNub admin panel, I enabled the mobile Mobile Push Notifications, and I added TeamID, AuthKeyID and uploaded the Auth Key token(.p8 file). See the following image.
And In my code, in AppDelegate, I register for PushKit notification. And once run the application, I will get the pushKit token in
the following method.
func pushRegistry(_ registry: PKPushRegistry, didUpdate credentials: PKPushCredentials, for type: PKPushType) {
ANSWER
Answered 2020-Nov-02 at 18:09I don't believe you need to be performing any String
encoding on the device token, and can directly pass credentials.token
directly (to both PubNub and UserDefaults).
For general Remote Notification debugging you can read through the related technical note. I've found using the Console app on macOS, filtering on your application's Bundle ID, helpful to see if there are any helpful system logs related to Push.
For PushKit on iOS 13+ specifically, ensure that you're calling the reportNewIncomingCall(with:update:completion:)
to inform CallKit that an incoming call was received. See pushRegistry(_:didReceiveIncomingPushWith:for:completion:).
If this doesn't resolve the issue, you can reach out to PubNub support, and they can provide additional assistance.
QUESTION
The question is getting from here and seem no one give a proper answer yet.
==================================
Hi Devs,
I'm developing a Social networking app which includes audio call feature. I integrated with SocketIO + WebRTC for this audio call. I'm receiving audio call by two ways. Socket call when socket is connected & active VoIP call by default irrespective of socket is connected or not.
FYI, Why i had two ways of receiving call as mentioned above,
- Enabled VoIP by default, because sometimes socket call is unresponsive and never show call at that time.
- Enabled socket when app is in foreground, to ensure that call is received in case of MissingDeviceToken/BadDeviceToken errors occurred for VoIP push.
Considering iOS 13 guidelines for VoIP usage, I followed below steps for integration.
When app is killed or socket not connected, will get VoIP call and responding with provider.reportNewIncomingCall(). So here no issue for VoIP usage.
When socket is connected, will get both socket call & VoIP call. But socket call will get instantly before getting VoIP call. So here's what i did:
- Responded socket call with
provider.reportNewIncomingCall()
. - After a little delay will get VoIP push for the same call which is already invoked by socket. Here, I should respond this VoIP push with CallKit. But i have already invoked the call. So, I used below code to handle.
- Responded socket call with
provider.reportCall(with: call.uuid, updated: update)
with same uuid & update used for socket call initiation.
Hope, this VoIP call also responded with CallKit and there's no issue in VoIP blocking/app termination.
Question 1 : Is this a proper way of handling above issue ?
===========================================================================================================
As per my app requirement, there's should be one active call at a time from my app.
Consider, I'm in active call and one more incoming call is received via VoIP. So here, I don't want to show the additional call. So I'm ignoring the VoIP push for the additional call. But it leads to this crash "Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push callback."
Question 2 : How to handle above mentioned scenario ?
===========================================================================================================
What I tryFor question 2, I try answer from this one.
Though it does not work in some case for example when user happen to answer a call fast enough, the second incoming call from push will result in Call Stacking screen.
This approach also create additional call in recent call list and a bar incoming call saying call ended during incoming screen for the first incoming event which is bad user experience.
I also found this one to look promising but it is very had known this will be fine.
Does anyone have any solution to this? Thanks
...ANSWER
Answered 2020-Oct-30 at 14:18As an Apple engineer confirmed me in a technical support request, my answer in theory is correct. However, in practice, it’s basically impossible to do that without either reporting calls unnecessarily or crashing for failing to report calls, due to the asynchronous nature of PushKit and CallKit. So, it is highly discouraged.
Therefore, for question 2, if for you this answer is not acceptable, the only solution I can see is to let the server handle it for you. So, the server should have a list of ongoing calls and avoid sending VoIP pushes to users that are already involved in a call.
For question 1, the solution you've implemented is not really reliable: You cannot do any assumptions on the order of events in an asynchronous environment. It's possible to receive the VoIP push before the socket call and in this case you fail to report a new incoming call, because you just report a call update. Or, another more subtle example: you receive the push and the socket call roughly at the same time, you report the new incoming call as a consequence of the socket call, but (remember that CallKit is asynchronous) while the system is processing the new call request, you process your VoIP push without reporting a new incoming call.
I believe that the simpler way to handle this situation is to have one and only one way to handle new incoming calls, which is through VoIP pushes. In this way, your app should work in any circumstance and you don't have to implement two different code paths for calls received when the app is terminated or when is already running.
QUESTION
I have set up PushKit in my app and I want to send upstream message. On a device it fails with the following exception:
...ANSWER
Answered 2020-Oct-20 at 11:32In my case there was a mistake passing "push.hcm.upstream"
to the RemoteMessage.Builder
argeument.
Code before:
QUESTION
Is it possible to initialize HMS without a agconnect-services.json
and provide the keys at runtime?
Using a similar service (Fcm) we can initialize an app:
...ANSWER
Answered 2020-Oct-09 at 11:34Update:
- Push Kit
You can add the following code in your manifest file:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pushkit
To set up the server, install the pushkit package on the server as well and then it can be imported like this:. The Email Address is requred for web push API. Once instance of sender is enough for one set of vapid key (one application).
The last piece of puzzle is to set up a service worker. Now if you are using a boilerplate/generator there's a chance that you already have a service worker. A service worker is a JavaScript file that gets loaded in the client in such a way, that it can still remain active even after you've left the web application. That's why Service workers can receive push notifications. In the client setup section we used a service worker file called sw.js, the URL should be accessible from the browser and have to be on the same domain (for security reasons). If you don't have a service worker, create one, if you have one, open it, and import the piece of code required to initiate the service Worker. You can either use it from CDN, or download the worker/binding.js file from the repository and import it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page