Skype calls - how it is possible on Windows Phone - push-notification

I'm working on my presentation about Windows Phone 8 and I'm wondering about multitasking.
I've read about scheduled task types and one of them is "PeriodicTask", but it fires only once about 30 minutes.
Then Skype crossed my mind - how skype calls work? How it is possible, that Windows Phone intercepts a call, when application works in the background. Consider that it's impossible to have continuously checking in the background.
Is it somehow done by Microsoft or can regular developer achieve something like this?
I think, that it's some kind of cooperation between Skype and Microsoft, because as far as I know showing calls is impossible to do by a regular application.
So my guess is that call is a push notification, which Windows Phone receives and shows a calling user.
EDIT:
The only applications which can execute tasks more frequently than ~30 minutes are these with location tracking:
Execute task even in the background

It's possible because of VoIP API available on Windows Phone 8. It works on notifications, so you don't have to check if there is an incoming call - your app will be notified about one by the system.
Read more on MSDN: VoIP apps for Windows Phone 8.
Btw. there is no VoIP API on WP7/WP7.5 and that's why Skype on these systems works just terrible.

Related

Capture a physical signature from a USB device into a web page

We've written a MVC web application for a client that they're typically interacting with from Windows 10 PCs. They've now asked us for a solution whereby the users can attach a USB device that captures physical signatures, and have that captured signature uploaded via a web page in the app.
While this sounds like a general permissions/privacy no no, I'm hopeful maybe some sort of solution exists out there...?
Thanks
James
there is a WebUSB API for chrome you could used. it's javascript api, you could communicate using ajax for the backend.
https://developers.google.com/web/updates/2016/03/access-usb-devices-on-the-web

Adding Server Push to replace polling on to an asp.net WebAPI REST service

I am hoping this is not too off topic for a post here.
I have an asp.net webAPI service, which provides a number of routes to get near realtime data (ie within say 10 seconds), which required the client application to poll for changes.
I am investigating on which technology would be best to add an "opt in" push notification service, which just pushes "thin" payloads to tell the client application it is now time to call the existing REST route for an update. This way, the push payload is small, and does not contain any security sensitive data (it still gets this using the existing REST security infrastructure)
Cloud based messaging
Previously, I have been told that, for a Mobile application, I should use something like Firebase cloud messaging, or some other messaging service, however this does not seem like the right solution for "subscription based notifications" I am talking about here. I can certainly see this would be useful, if the client is on either iOS or Android device, and wanted messages/notifications/alarms (etc), which could also work when the application is not running, but this does not seem like the right thing to use of these notifications of changed data (which may be happening all the time, sometimes every 5 seconds). Also, I do not want to only target these mobile devices, but also, for example either a web or desktop application, which may also use the same REST service
Other technologies
I have seen mention of Web sockets, or, in the case of asp.net, the option to use SignalR (which will wrap the web sockets, with fallback). SignalR looks good, but my worry is the availability of client libraries for non web / Windows applications (eg iOS, Android). I am also looking at Rest Hooks. These look interesting, but I can't quite see what the actual "push mechanism" is; it almost looks like they need to POST to the subscriber using HTTP, which means the subscriber has to also act as a "server endpoint".
Just after any thoughts / best practices on this, or what others have used?
In particular, (the verification or otherwise), that for this use case, using cloud based messaging is not the right thing to use due to the frequency of these push notifications (ie something where my server gets to the application via another 3rd party service which pushes to the device/application)
Thanks in advance for any suggestions!
Signalr is an option
There are some libraries which you can use in iOS and android. I suggest you to read once https://visualstudiomagazine.com/articles/2013/11/01/how-to-use-signalr-in-ios-and-android-apps.aspx (its a bit older, but on the point)
Android Client: See How to use signalr in Android
Some alternatives :
Pusher (https://pusher.com/)
Android Client: https://pusher.com/docs/android_quick_start
iOS Client: https://pusher.com/docs/ios_quick_start
Socket.IO (https://socket.io/)
Details iOS Client: https://socket.io/blog/socket-io-on-ios/
Details Andriod Client: https://github.com/socketio/socket.io-client-java
To discuss:
Why you will only send a thin payload whith signalr? I see no benefit for that.
Why "using cloud based messaging is not the right thing"? I do not understand your arguments but I do not know how your application looks like.

Sending a RESTful url (endpoint) from Band

I just have a general question. Can you send a url from a button on the band. I have a home automation system that you can trigger events by sending a RESTful url (endpoint) to. Basically I can put the url in any web browser and trigger the event. It would be great if this could be done through the Band. I don't really need a response from the Url, just to send it.
Does that make sense?
Thanks,
Scott
No, the Band communicates only via Bluetooth to (applications on) its paired device. On Windows (Phone), the application must be running, with a connection to the Band, and subscribed to the Tile button pressed event in order to receive such notifications. This generally rules out scenarios that require ad-hoc input from the Band unless you're willing to use voice commands via Cortana.
But i think its possible by creating custom tile and handling custom tile events. Haven't tried it in my project but can see from sdk documentation.
For android you can implement broadcast receiver and listen to tile events. Check: sdk doc
Chap 9, page 51
In short, yes it is possible.
However, the problem would be that the button would be single use to only send that ONE URL command and it actually wouldn't be done via the Band.
You can create custom layouts for your applications with the Microsoft Band SDK which will allow you to create a button. You'll then need to register to the click event from the Band which then would get fired on the device the app is running on. From there, you'd be able to send the URL but it would be sent from the Windows Phone or Windows PC rather than the Band so you'd need to be connected. The documentation covers how you can do this here: http://developer.microsoftband.com/Content/docs/Microsoft%20Band%20SDK.pdf
A downside to doing this with WinRT is that as soon as the app is closed and the connection to the Band is lost, your button click won't have any action. The best way to get around this is to create the connection to the Band in a background task but unfortunately, you can't keep hold of the connection to the Band for an infinite amount of time and you'd have to live with the possibilities that you may have times where it doesn't work. I have a GitHub sample which shows you how to connect to the Band in a background task for an indefinite amount of time.
The Microsoft Band has really been developed for the Health aspect and collecting data rather than interactions with other apps which it does in some way support.

Registering mobile phones on my web site

I am using a variety of mobile device clients such as Blackberry, Android, Windows Phone iPhone. At the moment I am focusing on Windows Mobile 6.5 (I know it is dated but I actually have one of these phones to test with).
I want to be able to register the app installed on the device with my web server. Now, I could just let the User create a Username+password combination but I thought It would be cool that the registration/activation process would involve telephone number or/and IMEI being automatically (in code) sent to my server. The benefits of this are obvious, seamless registration and as an added security measure in case the phone was lost/stolen.
Now,I know all about SMS gateways and I guess I would probably have to pay for this service to do what I want - or just let the User enter their telephone number in the login page. I also know that you can send emails to some telephone providers (not all).
Does any one have any knowledge of any free SMS gateways for small business use or pay-as-you-go service or/and clever way to register a telephone number with a web site either via GPRS or SMS?
Additionally, any knowledge of where to look to get the IMEI/UUI of the phone in code? It has to cover different devices so a generic way is a must (which rules out OpenCF).
I appreciate it is highly unlikely that are solutions to this without using a SMS gateway provider but there are some clever people on this site so open to ideas.
Thanks
The IMEI (and phone) number is locked down in the Windows Phone 8 API (for security reasons) so, if you want to make your solution future proof - you are going to have to force the user to find it on their handset and type it in manually. Other platforms (or previous versions of Windows Phone) may not be so strict on this.

How to send mail at a certain time from asp.net web application

I am new to asp.net. I have a project working. I need to send different mails every day at 12 am to different users. I need to know how to implement the method that will wake up every day at a certain period. Please help me with as much details possible as I am a complete beginner
Use Quartz.NET.
Quartz.NET is a full-featured, open source enterprise job scheduling system written in .NET platform that can be used from smallest apps to large scale enterprise systems.
You can use Windows Task Scheduler as well, but you need some specific windows permissions to do that on production server.
You can create a Windows Service that will be executed automatically at the time you want. The windows service should contain the code to send email.You can check out these links on Simple Windows Service Sample and Simple Windows Service which sends auto Email alerts. You can also implement a timer in your application that can manage it. If you want to do it this way then check this article.

Resources