Can I have some pointers on how can my "background app" make a call and send sms at some pre-defined number and predefined datetime.
This is not possible.
Windows Phone 7 does not support apps running in the background.
If you wanted to make a call or send an SMS from your app (while it was running [in the foreground]) you will need to use the PhoneCallTask or SmsComposeTask, respectively.
Note that these tasks don't actually make the call or send the SMS but prompt the user to be able to do so. One of the design intents of the platform is that the phone can't do something the user might not want it to, without the user knowing.
Related
I want to develop an app that has a background task that checks email servers (POP, IMAP, etc) for new email.
From what I can tell of background task, it is only allowed to run for a short time, and can be started only every 15 minutes if it is a timertrigger.
Since I want this app to run on all Windows devices, what is that proper approach to having a background task that can do this? It doesn't seem possible at this point.
But since Windows devices are able to check email in the background, there must be a way. Does anyone have any insights?
What you wish to achieve is a near real time notification of user about a mail he received . You are right that Windows doesn't allow a background task to run at intervals lesser than 15 minutes . What you are looking for is Windows Push Notification Service which can be used to send notifications from your own cloud service onto the device
It is not possible to use a background task working all time to get in real time the new emails in your case.
You must implement another approach may be using your own backend to implement push notifications to send a new notification when a new email is received.
If your provider has an API you can use it.
The company I work for is considering to build an application for Windows Phone. Well, actually we plan to build an universal app ( for phone, tablet and PC ).
There are some requirements ( especially for Phone version ), so I would like to clarify few things before allocating resources & hiring people.
I would be very grateful, if some Windows expert goes through these requirements and confirm that this is possible.
So:
1) We need to launch a call within the application.
I've found this solution:
Make a phone call in Windows Phone 8.1
The question: is it possible to launch a call without a prompt? As far as I understand this solution prompts a question to user, if he wants to call or not. Our flow and design is made in a way, that this prompt will be redundant ( of course, we launch a call on user's behalf ).
2) We need to maintain internet persistent connection and be able to react if some message comes using this persistent connection. I've checked PubNub and it seems that everything is OK and PubNub provides SDK for Windows Phone.
Important: this is not VoIP application, so it might get complicated if Microsoft has some policies that persistent connection might be used only by VoIP application ( Apple has these policies ).
Important thing: Persistent connection should stay connected, if application goes background, so there should be no "cut off".
3) We should be able to present some notification ( with sound alarm ) to user and launch the app if he "accepts" the notification. Basically, we should be able to send some message to the device using PubNub or even Microsoft WNS service for pushes and present the notification on the device. Like "Local Notification" in iOS.
Any help would be highly appreciated.
Thank you in advance.
Best Regards,
Maksim
1)Unfortunately on Windows Phone you can't start a call without the system prompt.. It's for security..
2)I can't help you here..
3)Of course you can send notification to a device. This notifications are called toast notification.
A notification's custom sound can't be setted within the app, you have to load the sound on a server or let the user decide (he can change the sound in the system settings). If you don't need a custom sound.. no problem, it'll be used the default ones and you don't have to worry about anything.
I use Parse.com to send push notifications or you can even run a sheduled task every 30 mins on the user's phone(maybe is not appropriate for your application).
In the notification you can also set the property navigationUri to open the app on a defined page.
Unfortunately you can't still customize the notification aspect(you'll be able to do it in Windows 10) and you can see the default aspect here: http://www.codeproject.com/KB/windows-phone-7/ToastNotification/PushNotification.png
In my windows phone 8 application, I would like to refresh/load some data periodically (less than 10 minutes) from server, while application running in background (ie, in dormant and tombstoned). I tried scheduled task agent and resource intensive task agent, but they are called at rate of 30 minutes gap. Please let me know is there any other solution for implementing the above said requirement.
Thanks and Regards
#nish
If you need to get data more frequently than the default available in Windows Phone, you should think about using push notifications. This won't be suitable for a full data push, but if you use it correctly, you can get a user experience that you can live with.
One common approach to this is to set up your server to send a notification to the device when there is something new to report instead of pushing a "nothing has changed" message every 10 minutes or so. If you push out a tile update notification to say, for example, "You have x unread items", the user may then click on the tile for your app and you can poll the server for new items on launch/resume. If you want a more intrusive option, you can send a toast notification as well, but in most cases the tile update will be sufficient.
This method has a few advantages.
You won't be burning through battery power polling every 10 minutes while the user is asleep
Your server will have significantly less load since it is not having to process full data requests every 10 minutes per client.
This fits in with the design philosophy of Phone apps - you are surfacing the required data to the user, while at the same time preserving battery life.
Do I understand correctly that your primary goal is to keep some host session alive by having the phone make a query periodically? If so...
I would not recommend this approach: 1) you cannot count on the phone having network connectivity when it tries to send its query. If the user puts the phone away in a pocket or purse, the odds worsen. 2) it's probably bad from a security perspective, and wasteful from a host resources perspective.
You might instead add logic to your app to resume a timed-out host session as seamlessly as possible. This would add real utility value to the mobile app value proposition over raw HTTP access to the same host.
I want a part(Service) in my windows phone app to run periodically.Actually its a server request , which should be made periodically and show any changes to user as notification
You should use the PeriodicTask which runs every 30 minutes in the background unless the user has not forbidden that. Notify the user about changes with a ShellToast or think about Push Notifications.
Important: Please keep in mind, that you can never rely on background tasks in Windows Phone. There are many reasons why such a task will not run. So do not outsource necessary or important work to it.
I'm writing an application for Windows Mobile 7 which required information about "When a voice call was placed" and "when a voice call was hanged up or disconnected". Are there any API's or events/triggers that can give me this information.
The current SDK doesn't offer this capability - generally, you cannot keep track of user activity (like calls) outside the application due to a sandboxed environment that by default doesn't offer any system process hooks.
While you can't get any information about a specific phone call, if your application is running you can be informed when a call is received (and ended) by using the Obscured and Unobsured events on the page.
Please note that this will be triggered when ANY piece of UI chrome covers the page. In addition to incoming call notifications, this will also include incoming SMS notifications, alarms, etc.
These event are an important part of the application lifecycle for some types of apps (typically games) but are often overlooked.