how to get user's skype status - service

i'm developing an android application that will send notifications to users, one of the ways it notify is via skype, i need to know the user's status to trust that the user is going to read the message since it seems i can send skype messages even when the target user is offline.
im using https://docs.botframework.com/en-us/restapi/connector/ bot's API to send the messages
¿is there anyway to get the current status(online, away, etc..) of an especific skype user?
since it seems they no longer offer "mystatus.skype.com" service.

Related

How to call Web service Continuously in ios

I have an ios app.
In which i have multi user account.So multiple user can Login.
When one user see other user profile and if that user is also online i want to notify him.
I can't get how to implement it.
If i have to continuously check some flag value on server if someone has checked their profile or how can i handle it?
Remote notifications is the way to do it. The logic on when and who has to be notified can be handled at the server.
You may have seen lots of apps asking for permissions to send notification. The downside being if the user denies that permission.
Polling from client side can also be one of the methods which can be used and but would require the client to do most of the computation.
So all in all, its a call you got to take considering what you are building.

How to get notified when our app is uninstalled in iOS

We are developing an iPhone application that allow users to send messages to others via Apple Push Notification Service when the target user have installed our application or SMS when haven't.
We want to get notified immediately when our app is uninstalled so that we can decide how to send the message to the target user.
We find the APNS feedback server have a long time delay that doesn't agree with our requirement. So we use another way: when our server recorded the target user have installed our application, we send him message via APNS, if he haven't read the message in 30 minutes, we believe that he has uninstalled the application, so we send the message via SMS.
Is there any way better?
As Oleg said, there is no way to accurately detect if your app was uninstalled.
The APNS feedback service returns a timestamp and a push token for messages it was not able to deliver. Sometimes, this indicates an uninstallation but it can also simply indicate a user that was simply offline at that moment. The Feedback service does have some lag so can not be used for time-sensitive intel gathering.
Based on your requirements, I'd say you're doing it right.
One suggestion that may or may not work for you would be to include a link (via url handler) to your app when you resort to sending an SMS. If it makes sense for the user to return to your app, clicking on that link should launch the app and you'll have a trace on your server if you make a simple call. If, however, after sending the SMS the user is not detected as coming back into the app, chances are highly likely that the app was indeed uninstalled or that the user is offline for an unusually long amount of time which may require some other type of action on your part.

Push Notifications for iPhone - accepted methodolgy

I’m looking at the designing and developing a service for Push notifications, and am trying to understand the order of processing in the Apple App when it comes to Registering for Push Notifications and storage of the Token.
What I’m developing currently is a service that allows subscription to individual changes that happen to particular processing on our server.
When they happen, the phone user may receive a message of type “A”, “B”, or “C”.
The phone user has to “subscribe” to each of these types individually if they want them. Otherwise they can ignore it and not subscribe.
So User Fred, on Phone #4, starts our App, logs in, and then has the ability to turn on or off subscriptions to events that are sent as Push Notifications.
So I need to tie details from Fred’s login, to Phone #4’s device Token, with particular subscriptions.
So my particularly important questions are.
When the Phone connects to the APNS server to get its device token, is this automatic on app start? Or can this be initiated at a later step? Ie, after going through a loging screen on our app.
Can we (are we allowed to) store the device token on the phone in the App's data store?. Or, should the App be connecting to the APNS server every time the app is run?
How does the App know if it as already called the APNS server and retrieved a token, or as above, should it call the APNS server time the app is run?
Can we (are we allowed to) store the token in the App’s memory as it runs, so we can properly subscribe and unsubscribe for particular messages?
We need also to be able to list all the subscriptions that a particular user may have across all their devices so the user can remove old devices (if they change phones). Or can we rely upon data back from calls to the APNS – when we attempt to push a notification - to inform us that a device token is no longer valid?
Or is there some better way of tying this all together?
When the Phone connects to the APNS server to get its device token, is
this automatic on app start? Or can this be initiated at a later step?
Ie, after logging into our app.
After the app has started, the app gets the token by calling registerForRemoteNotificationTypes. This will prompt the user for permission, and call a callback with the device token if permission is granted.
Can we (are we allowed to) store the device token on the phone in the
Apps data store?. Or, should the App be connecting to the APNS server
every time the app is run?
You'll need to build an APN provider, which is a web server that calls apple to send the pushes. The thing to do with the token is post it to your server that uses the APN provider. The app doesn't connect to APNS, your provider does, and it does it when it has pushes to send.
Can we (are we allowed to) store the token in the App’s memory as it
runs, so we can properly subscribe and unsubscribe for particular
messages?
You can keep the token on the client, but you don't really need to. It's your web service that calls APN, so it needs to be kept aware of your users' subscription prefs.
We need also to be able to list all the subscriptions that a
particular user may have across all their devices so the user can
remove old devices (if they change phones). Or can we rely upon data
back from calls to the APNS – when we attempt to push a notification -
to inform us that a device token is no longer valid?
APN also provides a feedback service that you call in batch which returns the device tokens that are no longer valid. Not only can you use this service, but you must. Apple will get mad at apps that repeatedly send to no longer valid devices.
Or is there some better way of tying this all together?
Yes! Parse.com provides a nice wrapper on the client code, does the provider and feedback service, abstracts the idea of single devices to the idea of a "channel" which sounds like just what you need for multiple notification types A, B, C, provides a super-easy step by step setup, and loads of other useful cloud services for iOS. (I'm not affiliated, but a big fan).

Could one iOS application support multiple push notification registration?

This is the first time that I approach the push notification service and I'm little bit confused. I 'd like to have just some conceptual help, not code.
I need to build an app that should receive and register for different kind of notifications. For instance in my app I'd like that users could register for PROMO notifications category and NEWS notifications category, I'd like that they could choose which one they want to be notified.
Reading the Apple doc, that was not so clear to me, it seems that once the app device is registered I receive just one token and seems impossible to receive more tokens for different kind of registration(NEWS and PROMO for instance), because the token is related to the app and the device. Is that correct?
The other thing that is not so clear to me is, if a device is registered for a specific notification is it possible to send the notification only to a set o devices?
If nothing of that is offered by Apple Push services do you think that is possible to manage everything like that:
-I register the app device for notification if (PROMO || NEWS) are selected
-I get the token
-I send the token to my server giving also as additional info about the service which the user wants to subscribe
-The server (provider) register the token and the kind of subscription (PROMO || NEWS)
-Later when I have a notification to push I ask the server all the tokens registered for that specific category and then I send the notification only to those devices registered for that category.
Thanks for helping me out I'm really confused.
"Reading the Apple doc, that was not so clear to me, it seems that once the app device is registered I receive just one token and seems impossible to receive more tokens for different kind of registration(NEWS and PROMO for instance), because the token is related to the app and the device. Is that correct?"
YES
The other thing that is not so clear to me is, if a device is registered for a specific notification is it possible to send the notification only to a set o devices?
YES, you need a DB where you connect a Push Token with the related Services (promo | news). If you have a new Promo Push Message you send the message to all related token. on the app site, everytime the user change the categorie (promo / news) you should prpvide these infos to your service with the push token.
These are all problems that you have to solve yourself on the server side. The push service simply provides a means to send a single message to a single device. You have to figure out yourself which messages you want to send to which devices. Each message has to be sent individually, there's no way to "broadcast" a message to all your users directly.
You could think of the push tokens as email addresses – of course, one email address might be subscribed to different newsletters from the same publisher, but it's the publisher's job (yours) to figure out whom to send which newsletters, not the email provider's (Apple's).
You should think of the push notification registration like my I send the user push notifications. Not what kind of push notification can I send the user.
Then you need to do serverside filtering on you categories, like the ones in your example promo and news.
The perferance of the user should be stored on your server, so you will know what kind of notification to send to which user.

Sending push notification from device to all contacts

I have an app where I would like to select a user in my contacts. If that person has my app installed, then I would like to send some data that is relevant for this app using a notification. The other user gets the notification, and acts on it within this app. Is that possible? I am thinking that if I can identify that users device, I can store this message in a server. When the user connects to the app, it will retrieve and get this users message from the server. But question is can I identify other devices like this, from my contact list. Can I send this notification using phone number instead of device id?
Please help.
Thank you,
Anks
No, you cannot. You have to have the Apple Push Token for a device and the user has to have notifications turned on to be able to receive notifications from Apple Push.
You would need to maintain a server side database linking the APNS Token to a specific user account. There are a lot of dots to connect with this kind of implmentation. Your better bet would be maintaining a "list of contacts" within your App to link contacts to.