I am working on WP7 application to track user location. I need to track location with GeoCordinateWatcher (using StatusChanged / PositionChanged events) even when device screen is being locked.
How to do that?
Your question is already well-documented in this MSDN doc (there is even a sample available). In Windows Phone 7, this is not possible - there are a lot of API implications that target only Windows Phone 8.
Related
I have a Windows phone 8.1 Silverlight application.
Now I need to make it run also on windows 10 phones and tablets. I checked and the app is available on windows 10 phones, even if deployed for windows 8.1 but it seems like I can't install it on windows 10 tablets.
My question is pretty simple:
Is there a "fast way" for converting the 8.1 project to UWP?
Can I deploy my app for tablets without re-writing all the code?
Thanks all
This question is oddly similar to one that I answered just yesterday. It's not really a duplicate so I will restate the answer here along with a link to the other question (1)
Unfortunately there is no easy and fully automated way to port your Silverlight app to UWP mostly because the API footprint has changed and updated between the 2 platforms. There are a lot of similarities but also a lot of breaking changes that require some manual changes.
here is Microsoft's guidance for this particular upgrade path.
From the article above:
Note This guide is designed to help you port your Windows Phone Silverlight app to Windows 10 manually. In addition to using the information in this guide to port your app, you can try the developer preview of Mobilize.NET's Silverlight Bridge to help automate the porting process. This tool analyzes your app's source code and converts references to Windows Phone Silverlight controls and APIs to their UWP counterparts. Because this tool is still in developer preview, it does not yet handle all conversion scenarios. However, most developers should be able to save some time and effort by starting with this tool. To try the developer preview, visit Mobilize.NET's website.
[1] Can a Silverlight out-of-browser app be converted to Universal Windows Platform (UWP) app?
I would like to create a ScreenCaptureLib.dll which is intended to be built for Universal Windows.
We already have the following using Windows.Forms:
https://github.com/ShareX/ShareX/tree/master/ShareX.ScreenCaptureLib
Obviously none of the Windows Forms code does not work and I would like some pointers in the right direction to get started.
You may follow the official document for Record the screen with ScreenCapture, but please notice that:
The ScreenCapture API is only available on mobile devices.
And for now there is no API can be used directly to capture the screen on a desktop from an UWP app. However, as a workaround method, we can render the XAML tree to a bitmap, to do this, please refer to Capturing Snapshot in Windows 8.1 Store App.
You may also submit a request to add this new feature for developing through the Windows Feedback tool.
Update:
The ScreenCapture feature is only supported for mobile devices running Windows Phone 8.1. This API is not supported on Windows 10.
I'm working on a metro app and am having trouble finding how not to show the application.
We recently deployed tablets to our field reps, and need to add gps tracking. GPS is much easier to deal with in the metro libs (it's like 4 lines of code vs. unmanaged) so we're hoping to be able to push a metro app instead of spending time coding a winforms/wpf desktop app (the tablets are full version windows, so it's an option if we can't hide a metro app. I feel like it should be possible though as the start screen tiles update automatically without opening the main program).
In WPF, it's fairly simple to make a window invisible. I'm creating the metro app in wpf, but it uses different libs than desktop and I may just not know how to do it.
In desktop programs, it's fairly simple. You do something along the lines of:
<Page
x:Class = xxxxxxxx
..
Visibility="Hidden">
Unfortunately, with metro, the only options I have are collapsed and visible. Collapsed doesn't seem to have any effect, unless it's just because it's not deployed and visual studio shows it anyway...
So basically I'm trying to figure out if there's a way to start the program minimized or hidden so that it doesn't interrupt the field reps every time it takes their location.
If you really want to make a metro app and want it to run "minimised" you will need to look at background task. To start the background task the user would still need to start the app at least once, futhermore background task have limitation how how often and how long they can run. Also there is a lot of constraint on deploying a windows store app if you cannot publish it in the store.
If your goal is to just have access to GPS through C# apis, the GPS is actually one of the winRT api you can use from the desktop, you can find a tutorial on how to access winRT api from the desktop here
Here is the complete list of winRT api accessible from the desktop (You can find Geoposition class among them).
Have you looked into creating a background task that transmits GPS? The background task can run without the app running.
I am not entirely certain you can voluntarily minimize a Windows Store App on a user's behalf. I see nothing in IntelliSense about it, nor have I found anything online or see any app do it.
However, be aware that deploying the app without using the Windows Store -- sideloading -- requires Windows 8 Enterprise edition computers joined to the domain OR Windows 8 Pro with a sideloading key ($30 per key, purchased in packs of at least 100.) Perhaps a WPF app with unmanaged code is worth the money and effort.
I am currently trying to extract WiFi information such as signal strength and MAC address from my windows phone 7.5 for an accurate location app I am working on. The OpenNETCF.Net framework has all the functionality I require (and is even described my MSDN: http://msdn.microsoft.com/en-us/library/aa446491.aspx) however I cannot seem to be able to import the namespace into my project using visual studio. It complains that the framework was not designed for windows phone projects. Is there any way around this? Or does there exist and equivalent framework which would work on WP7?
Thank you
Windows Phone 7 is only distantly related to Windows Mobile & Windows CE (for which that library is for).
There are a few how-tos for dealing with network information on MSDN, although I don't believe that WiFi signal strength is made available to apps at this point in time.
It is worth noting that there is a specific how-to for accessing location information, where the operating system can use Wi-Fi signal information to help triangulate location, where GPS is not working.
I'm afraid that it is impossible on Windows Phone current version
I have a Windows Mobile 6 application, written in C# and I want to port it to Windows Phone 7.
What modifications do I have to do to the original application? Do I have to modify only the user interface or are there any other things I need to modify in the backgroung code?
You can not use native API in Windows Phone 7 applications.
You should recompile your dlls from wp7 environment.
UI should be re-written with XAML.
All interaction with network should be acync.
WebBrowser is different from WinMobile6 one.
You can not use sockets (should wait for Mango update).
It is likely you will need to make a decent number of changes. The framework changed from .NET Compact Framework 3.5 to Silverlight Phone Edition, aka almost-but-not-quite Silverlight 3. And the guidelines for submission to the app store are much stricter in terms of user experience, e.g. time taken to load the app, behavior of background processing, etc.