Access pictures on a Windows Phone 7 from a Windows 8 application? - c#

I am trying to access images on a Nokia Lumia 610 from a Windows 8 C# application. As it has been pointed out in other posts, such an access has only been possible via Zune and Window Phones would not even be directly visible in Windows 8.
However, using the Windows 8 RTM version I now noticed that the Lumia 610 becomes visible as a device. Still StorageDevice.FromId() raises an exception.
So my question: does the previously valid information ("access to folders on Windows Phones is only possible via Zune") still hold? If not, how can I create a StorageFolder object for a Windows Phone in a Metro/C# application?
Thanks!

I don't think you'd be able to use any WP7 device as a StorageDevice. If I recall correctly, Windows Phone 7 uses IsolatedStorage for storing any and all content, and as such you can't access the files on a Windows Phone through Windows Explorer without rooting/jailbreaking your Windows Phone. And even then, you wouldn't be able to access it through a Windows 8 App AND pass certification at the same time.

Related

How to test real Windows Store 8.1 in-app purchases with CurrentApp?

I have an universal windows app (Windows Store 8.1 & Windows Phone 8.1, NOT UWP!), published it (both Win and WP packages) as hidden (Hide this app in the Store. Customers with a direct link to the app’s listing can still download it, except on Windows 8 and Windows 8.1) but it looks like that people can access app from Windows Phone 8.1, Windows 10, but not from Windows 8.1.
Indeed, on Windows Phone 8.1 (even on simulator) I can debug "real" in-app purchases using CurrentApp instead of CurrentAppSimulator, and even can download app using direct link.
But when I try to use in-app in Windows Store version it doesn't work: Windows.ApplicationModel.Store.CurrentApp.LoadListingInformationAsync() throws Exception HRESULT: 0x801900CC ("no content").
I've read this topic but in my case all the packages are published, so Store knows about my in-app products!
In case with WP8.1 I had to add:
<mp:PhoneIdentity PhoneProductId="my old-style app id" PhonePublisherId="my publisher id" />
into the app manifest.
Maybe there is something similar for Win Store 8.1 apps? Is there a way to test real in-apps on Windows 8.1 before making app available for all?
when I try to use in-app in Windows Store version it doesn't work: Windows.ApplicationModel.Store.CurrentApp.LoadListingInformationAsync() throws Exception HRESULT: 0x801900CC ("no content").
About your first problem, we can see that the Store server is not aware of your app having the In-app purchase that you purchase. As your description, you confirm that your app has been submitted in the store and got it approved, but can you check the In-app-purchases products in your app are approved? you can get these info from the dashboard---Add-ons.
Is there a way to test real in-apps on Windows 8.1 before making app available for all?
According to the Beta testing and targeted distribution, there's no specific option for Windows 8.1 beta testing currently. But you can also download your app on Windows 10 device to test if your IAP product without problem. If it can work well, then you can make it available to all users. This seems to the only work-around.
Please also note that it will take 1-2 days after that for IAP feature from real products to start serving.

Substitute for EasClientDeviceInformation() in Windows 10

In one of our projects on Win-RT targeting Windows 8.1 , we had used EasClientDeviceInformation() to get the client device information. But, now we want our app to be working on windows 10. So is there anything else that we could be using?
You need not change your code at all. EasClientDeviceInformation API is available on Windows 10 and you can use it in universal windows app and it would work on both Desktop and Phone. MSDN Page for this API lists the detail.

Windows phone store Query

We have an app which is built in Windows phone 8 silver light framework. As windows 10 is coming and we are trying to upgrade this app to Windows phone 8.1.
Our only concern is can we keep both version of the app on store? i.e on store we should be able to upload two different build for WP8 and WP8.1.
Let me know if you guys have the answer
Yes you can have two different versions in the store. But my question is if you do have a Windows Phone 8 version of an application why do you need the 8.1 version too, where WP8 application would support both the versions?
You could have a look at this, in order to migrate your app into Universal apps.

Getting Windows Phone version and device name in Windows Phone 8.1 XAML

In Windows Phone 8 Silverlight I use
Environment.OSVersion.ToString()
to get Windows Phone version and
DeviceStatus.DeviceManufacturer+" "+DeviceStatus.DeviceName
to get device name.
These APIs no longer work with Windows Phone 8.1 XAML. I have found
Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation()
this seems to return the manufacturer and device name but OS is returned as just "Windows Phone".
Is there a way to get the exact Windows phone version?
This is currently not possible In Windows Runtime 8.1 (Phone and Windows). It does look like it might be planned thanks to Morten Nielsen and Pete Brown
EDIT: This is now possible in Windows 10. See this SO answer as well as this article for more useful features.
For 8.1, you can use this project on Github https://github.com/Microsoft/phone-info that includes an example application for retrieving both static and dynamic properties of a Windows Phone device.
For Windows 10, the APIs that were used to gather these data on (8 and 8.1) have changed. I have found one blog post https://www.suchan.cz/2015/08/uwp-quick-tip-getting-device-os-and-app-info/ for someone who has created a helper class that retrieves the following properties from a Windows 10 UWP app
current OS family - phone/desktop/...
current OS build number - 10.0.10240.16413
current OS architecture - x86/x64/ARM
current App Display Name
current App Version - 3.0.2.0
current Device manufacturer - Nokia
current Device model - Lumia 1520
In his post he shows how to get basic data about current device, operating system and application.
give it a try maybe it helps
In Windows Phone 8.1:
Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation().FriendlyName
It worked for me!

Detect OS version - Windows Phone 7 or Windows Phone 8?

I have an application for Windows Phone 7. I have created visual studio 2012 in windows 8 desktop. I am trying to use the application in Windows Phone 8 device also with some changes involved. How can I programmatically detect whether the device is Windows Phone 7 or Windows Phone 8?
Just as you would on any other platform with C#: Environment.OSVersion
You can use this toolkit to check the version of the phone:
http://mangopollo.codeplex.com/
bool IsWP8() : Returns if the phone running the application is a
Windows Phone 8
EDIT: If you don't want to use the whole toolkit here is how it checks it:
public static bool IsWP8 { get { return Environment.OSVersion.Version >= TargetedVersion; } }
private static Version TargetedVersion = new Version(8, 0);
Creds to original author.
You shouldn't need to.
Either it is a Windows Phone 7 app and will work on both Windows Phone 7 and Windows Phone 8 devices or it is a Windows Phone 8 application.
A Windows Phone 7 app running on Windows Phone 8 shouldn't be able to do anything that a Windows Phone 7 device shouldn't be able to do.
This article has some good strategies as well.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202996(v=vs.105).aspx
It is not just about run-time either, for example, your code may function one way on wp7 and another on wp8 depending on availability of an API. In this case a #define may the best way to go, because you really don't care what kind of device you are running on, but what SDK you were built against.

Categories

Resources