I'm new in developing application for Windows Phones.
Till now I'm only experienced in developing desktop applications in .NET and mobile apps for Android platform.
I want to develop an application which consumes the location updates of the GeoCoordinateWatcher in the background (user starts position tracking and switch over to any other apps on the phone). And as soon as a certain criteria matches for the current location I'll inform the user about that event. (turn on vibration module or play a specific ring tone, ...).
The only two things I've read in the internet is using MPN (push notifications) or Agents (e.g. PeriodicAgent). But both of them aren't suitable.
I need some basic hints how to achieve the behavior mentioned above. Aren't there any background tasks?
Thank you very much!
Kind regards, Danny
AFAIK, periodic agents are only thing you can use. But they are run automatically every 20-30 mins and its not suitable if you need to check the location more often.
Related
I'm new to Xamarin platform. I'm developing an application for all three major platforms (WP,iOS,Android) using Xamarin.forms.
How can I sync data with my server in the background -> I need something similar to Android Service. I want to sync the data even when the user goes to a different screen of the app. It would be great if I could continue syncing the data even when the user leaves the app.
Thank you
This is the only solution i have found
http://arteksoftware.com/backgrounding-with-xamarin-forms/
in a few words:
You can't abstract background tasks in Xamarin.Forms because iOS, Android and WP works in a different way. You have to use MessagingCenter to send and receive data from specific implementations in each platform
Have look to this article: http://developer.xamarin.com/guides/ios/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/ios_backgrounding_with_tasks/
You could provably be interested in the Transfer Background tasks.
Regards
I have created one desktop application using MFC. It contains different tabs like settings, about etc. I want to know hit count of these tabs i.e. how many times user clicks/opens these tabs. Can I use Application Insights or is there any other method to do so.
To get started though, from SDK perspective we can support other types of apps like desktop apps. Here are the steps required to setup it up manually and the code required to get metrics, events, traces, etc sent to the application insights service.
Desktop App with App Insights
This feature, it seems, is quite wanted and you can vote for it on the official site: https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/5484795-add-support-for-desktop-apps-to-application-insigh.
I also agree this will be awesome if they make it available for desktop applications, so fingers crossed!
edit: As it seems, on the upper link I provided, on December 05, 2014 they added support for this in the following matter:
While desktop apps are not listed as targeted app types for Application Insights, it’s possible to get instrumentation for desktop apps using Application Insights SDK. Please refer to this thread for more details: Application Insights for WPF Application. At this point Application Insights team believes this should unblock most of the users who voted for this feature, and we are closing this item and releasing your votes back to you. Please let us know if there is another aspect that blocks using AppInsights for desktop apps.
Folks,I am planning to build an app to count the number of sms's sent by an user over a period of time.But I am not sure if WP OS SDK gives access to the depth of writing such an app.I am still very new to mobile development,and as Microsoft has limited the access to some API's (ex:language) in the windows phone OS,I was not sure if I can do so.
On the contrary the application I want to build is kind of a basic feature that is in built in many basic phones.I need to get a start for app building,and may also come in handy on my personal phone! ;)Anyone who has come across working on any related feature might help me with his experience.Thank you for your time.
The Windows Phone SDK does not allow developers to access the content of SMS messsages for privacy reasons (or count of those, for that matter).
Your best (and only) bet at the moment is let the user use SmsComposeTask and count the number of messages potentially sent from your app.
In "old" times I created simple tool for Windows users, which tracks what they were doing in the front of computer (where simple activity monitor). I was using Win32 api and functions like GetForegroundWindow, GetWindowThreadProcessId, etc.
Yesterday I installed new Windows 8 and tired to run my program. I got 50% success: for "classic" desktop it works like always:).
For Metro UI I just got one application: WWAHost :( without any details.
So my question is: is there a any way for tracking active application in Metro UI?
Thanks for help
UPDATE:
I'm trying to access Metro UI app from Win32, I know that accessing Metro app from another Metro app is impossible
You see, in WinRT, your application is the top-most application. And when your app is not the top-most application then your threads are suspended and the kernel will not schedule any more operations for your app. End of story.
This means what you are wanting to accomplish cannot be done in WinRT. You are thinking more like a resident app or a service with access to the desktop. Those apps have two advantages. 1) they are always running. And, 2) they have the API to do what you are wanting.
WinRT intentionally puts apps in a sandbox so that the user's experience, performance and battery life are protected. Your scenario and scores more like yours underscore the continuing need for desktop apps. (as long as there is a continuing need for those types of apps ;)).
Sorry, if this is bad news.
As for enumerating other apps. This is also not possible. You cannot know if another app is installed or if it is running. You can call out to another app through protocol activation or file activation or (in a sense) through the share contract. But you are unaware if they get the message and if the user has it installed in the first place. And this is by design.
It is worth mentioning that you can pinvoke to Win32 APIs in your WinRT application. It causes lots of problems and can create a headache to get certified into the store. But even then, not all APIs are open to you. And you will find this particular use case is a non-starter.
I am sure this will not be possible. With Windows 8 'Metro' only a single application is active. All other applications will be in a suspended state whilst the topmost application is running. This makes it impossible to write an application that monitors other applications which are currently executing.
See the numerous articles on the Windows 8 app lifecycle.
Obviously it's early days, I do not know whether this is information that is in the public domain or not yet, but...
I have trawled through some of this site - http://www.windowsphone7series.com/ but I can't seem to find the answer.
Specifically will I be able to write an app on the phone that updates the cloud with the phones current GPS position in the background even when other apps are running in the foreground.
According to ZDNet's post yesterday, Windows Mobile 7 will support multitasking for things like having music playing while using an application, but as far as 3rd party it will most likely not be supported. Things like notifications however will be there, as to help with multitasking.
I hate to relieve myself on your bonfire Christopher but might I suggest that a background GPS process, might not be a good idea. You'd really run down the users battery performance, perhaps if you shared a little more about your idea we could suggest an alternative architecture that didn't require a constant gps post.