How to get the device token of a mac? - macos

I am using the PushWoosh solution to present and send the notifications from my webpage to the mac users.
I would like to set my computer also as a test device where I could check and test my notifications.
To do this, the PushWoosh wants from me the device token of my mac. How and where can I get it?
Here you can see the screen of PushWoosh:

This paragraph in the "Notification Programming Guide for Websites" documentation seems potentially useful:
To check the permission level a user has set for your website, call
window.safari.pushNotification.permission() with your Website Push
ID as an argument. This synchronous call returns a permission object
for the given identifier by looking in the user’s preferences. This
function does not contact your server.
One of the items passed back in the permission object structure is deviceToken, which appears to be what you are looking for.

Related

Error in saving while uploading android apk in google play console

I'm trying to upload a new android apk in the google play console. It has a couple of additional permissions like READ_SMS which is triggering a permissions form that I have filled too. I am however unable to save the data. Error code in logs: 858285013
Error snapshot
I had the same issue in one of my apps. I followed the below steps to resolve the issue.
Upload the new apk with only required permissions in the track which you want
Now you can see the Old apk with retain option
If you click on retain button, you will see permission declaration form
Select No, this release does not meet the SMS and Call Log permission policy option and click on save in bottom right of the page
Now click on discard button
Now create new release and upload the latest APK and fill the declaration form
Save the new changes and now you will able to save the changes
Before that if your app is using RECEIVE_SMS & SEND_SMS to verify the mobile number, then you need to change the implementation of mobile verification. For that you need to use Google's SMS retriver API. If your app comply with the Google developer policy, then you can keep the READ_SMS permission and for that you need to mention the valid reason in the permission declaration form in play console. Or you can remove the READ_SMS permission, and proceed with the flow as mentioned above.
You must Use SMS intent or you need to send a declaration Form... SMS, CALL LOG.. not allowed from 2019 Jan 9th.. Plesse Check this link android SMS Permissions
SMS Permission Declaration Form

Sending Push Notifications to Specific SquareUp Devices

I'm working on an app that uses the Square API to react to Point-of-sale events. For example, a customer goes to a take-out restaurant. The restaurant uses Square to accept payments. The customer pays cash. At that point, Square sends a notification to a custom webhook with the PAYMENT_UPDATED flag. Then, the app I'm working on should send a push (APNS) notification to the device that just accepted the cash payment.
The problem is that I haven't found a way to single out a particular device within a Square location. So what ends up happening is that all devices registered to a Square account get the push notification.
The user registration workflow is as follows:
A business launches the app and gives permission to receive push notifications (this is where we get and save the device token).
The business registers for an account.
The business authenticates with Square (allows our app to receive Square notifications).
I feel like there should be a way to associate a device token used for APNS with a device ID linked to a Square Location (and subsequently accessed via Square's Location API), but I haven't been able to figure it out.
Any thoughts or suggestions? Thanks!
UPDATE
The code isn't really the issue. By that I mean whether we're using PHP, Java, Ruby, etc, the issue remains the same. The only solution I can think of would be to use Square's SDKs to build a completely custom POS system, but that'd be like using a sludge hammer to put a tac in a wall.
The ultimate goal is to simply create a relationship between a Square device and a user's device I have stored as a record in my sql database. Seems like it should be straight forward, but not so much.

Receiving messages back to my platform

Use Case SMS leaves my platform and goes out to a receiver (SMS). I would like to attach some sort of custom identifier so when the user responds back to the SMS..and my platform received the message..I know how to internally route the response back in my platform.
Any ideas?
Maybe set up a system where when the code is sent out
For instance:
Code - 11832
The user then has to enter this code on your website. A program will then match to see if it's the identical code. So you are then able to log the information
No expert on this though and Where is your code ?
Twilio evangelist here.
There isn't really a great way to attach an identifier to the message itself. You could force the user to prepend/append a code in their reply, but depending on your specific scenario that might not be a great user experience.
Another option is to save the to/from phone number as a unique pair when you send the message. Then as your application receives replies you can check the incoming to/from phone number against what you saved.
Hope that helps.

Android Invite System

Is it possible to get usernames from a parse database perhaps by using a query and then sending them an invite in the form of a push notification or email? I want to be able to invite users to edit something but I checked the documentation and can't seem to find anything that is strictly Parse. Everything I've found involves Facebook and/or Twitter.
As per my knowledge, there is no invite system in Parse. However, it shouldn't be too hard to implement.
You can query the Parse User table for all user id's that match the your need and send them push notifications using Advanced Targeting.
See this for android push notifications:
https://parse.com/docs/push_guide#sending-queries/Android

FacebookOAuthException: Error validating access token on WP7 using Facebook C# SDK

I have a strange problem with the Facebook C# SDK on Windows Phone 7. I am using the SDK to post pictures to users' walls. For the first authentication and the first few posts, it works great. After a while (I have a feeling the magic cutoff is 24hrs) I start to get an error on every post:
FacebookOAuthException was unhandled
(OAuthException) Error validating access token.
This happens after my line of code that does the actual post has run...
m_facebook.PostAsync(#"/photos", parameters, PostComplete);
... but before my PostComplete callback function is called. No code of mine is running when the exception happens. My Application_UnhandledException is not called - I get the error in a dialog in the middle of the screen in VS, and it says that no source code is available.
If this exception means I need to show the login screen again, that's fine - right now I'm both not sure what it means and not sure how to trap the bugger. Any help appreciated.
Chris
What publishing permissions do you use?
By default, access tokens expire after a short time period to ensure applications only make requests on behalf of the user when the are actively using the application.
For getting a long-lived access token, you need to ask for the offline_access permission.

Resources