Do not play songs from phone music library on device in WP8.1 - windows-phone

I develop the music application for Windows Phone 8.1. I use BackgroundTask and access to phone music library. Application work fine on emulator with virtual sd-card, but do not work on device. When trying playback on device, an error occur:
Failed with error code System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
This problem code, which errors occured. Code placed in foreground app for simplycity:
BackgroundMediaPlayer.Current.SetUriSource(new Uri("C:\\Data\\Users\\Public\\Music\\Ballroom\\Juan Camus - Now That The Love's Gone.mp3"));
BackgroundMediaPlayer.Current.Play();
Does anyone know how to solve this problem?

Using SetUriSource from the background task does not work when pointing to files that are not packaged with the app. If you want to play files from the user's library or SD card, you need to use SetFileSource or SetStreamSource instead. You can get the file from a path by calling StorageFile.GetFileFromPathAsync(path).
Unfortunately, this is not documented, so a lot of people will probably run into this (especially since the sample uses SetUriSource). What makes it even worse is the fact that using SetUriSource does work in the simulator and even on the phone, when deploying from VS. But it stops working when submitting to the store. So people will find out very late that their app does not work...

Related

Is it possible to collect info on why an app you created is crashing?

I have developed an Android app using react native.
When I run on simulator its fine, and also when I debug via USB on real device its fine.
However when I publish to Google Play store and download the app as a regular customer it sometimes crashes.
Are there any logs somewhere that I can refer to in order to identify what the issue is? Or perhaps there is something I can add to code to help identify where/why issue is occuring.
You can use log errors to do so, record the activity of user. When the app crashes, your app can ask the user to send the bug report.
Using that bug report you can understand why your app crashes.
You could also use tools like Sentry or Firebase Crashlytics with an Error Boundary
wrapping your app to report errors, allowing you to have a better understanding of the production errors by displaying the full error stack trace and a lot more.

This app is not available for your phone because it requires front facing camera

We have developed an app using Xamarin Forms which targets iOS, Android and Windows Phone. We are using camera feature to take/select photos to be uploaded to the app and the feature works well on all three mentioned platforms.
We have some users facing issues on few windows devices. When a user tries to download the app from Windows App Store, they receive following error:
"This app is not available for your phone because it requires front facing cameraā€¯
I have attached screen shot showing the error for reference. The screen shot is taken from Nokia Lumia 635. Our finding that this device has only back camera, no front camera and we believe this might be the reason for above mentioned issue.
Ideally, users should not get this error as this device has back camera and they still can get the photos.
Is this a known issue in windows phone world?
Can this be fixed from code, device permissions?
Is this a device specific problem?
Any ideas?

"The device does not recognize this host message when running app on the device" [duplicate]

I'm trying to profile my application using Instruments on the device itself. Specifically, I'm trying to do time profiling.
Unfortunately, I just can't get it to work. Here's the situation:
1) If I run instruments with the app signed using the developer profile on the simulator, it works.
2) If I run instruments with the app signed using the distribution profile on the simulator, it works.
3) If I run instruments with the app signed using the distribution profile on the device (which is the default case for profiling since the scheme is set to use the release build) then Xcode complains about that there's no valid provisioning profile. That seems reasonable.
4) If I run instruments with the app signed using the developer profile on the device, then Xcode transfers the app, but then states that it's "Finished running" immediately. The app isn't run, and in most cases there's no error message.
Sometimes, just sometimes, there's a message from the Organiser stating that device does not recognise host - E800001C.
5) Running the app directly using the developer profile works fine - I can debug as expected.
Summary - I can't run an app on a device through Instruments using a debug build - it stops before it's had a chance to start. There are no error messages - nothing at all in the debug console.
Help?
Thanks,
Tim
I've solved this. It hadn't occurred to me to check the console inside the organizer. It said:
: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
After a bit of Googling I discovered that deleting the app from the device would solve my issue. Now I can profile.
So easy when you know how. Hope that helps someone else.
Tim
First of all app can be executed on simulator without signing it. Now apple has provided us the developer profile to test the app on devices.
Distribution profiles are created for submitting the app to the apple store or when application has to be distributed to the employee within the enterprise.
If want to do profiling on device do it with developer one. It should work.

Getting a COMException in my Microsoft Lync video chat app

I am trying to develop a basic app in Visual Studio that does a simple video chat with another person. Everything was working fine and I was able to successfully open a video chat. However, I have installed Lync with UI Supression, and the app will not run. Examining the InnerException I can see that the program is throwing a COMException "Exception from HRESULT: 0x80C8000B"
Via process of elimination I have found that commenting out the line auto = LyncClient.getAutomation() lets the app run, though the functionality of the app is gone.
After all my searching online I cant determine what could be causing this line to break it, and I know I need that line of code in order to move forward.
Automation is not available to you when running in UI Suppression Mode.
Suppression mode requires that Lync be installed on the client's machine, but you then need to use the Lync SDK to do a lot of the things that the client does for you, such as signing in (no trivial matter). However, the Automation section of the SDK is the link to the standard Lync UI, which is why it is unavailable to you.
You also don't have access to any of the UI controls that make up the Lync client ... with the exception of the VideoWindow control - which will most probably be useful to you.
There's a good article on understanding UI Suppression Mode here: http://msdn.microsoft.com/en-us/library/hh345230.aspx
Also, a great sample of how to sign in to Lync when using UI Suppression Mode: http://msdn.microsoft.com/en-us/library/hh378603.aspx
One more thing: if you have access to it, in this book on Lync chapter 5 actually has an end-to-end example of producing a UI Suppression AV kiosk app in WPF - which might be exactly what you're looking for.

Crash Log on Windows Phone 7 device

I don't have a WP7 device yet. Everything is functional in My App on a Simulator, but when my customer test it, app does not function at all. e.g. VDO is not playing.
Is there a way to get a crash log from Windows Phone 7? (like iPhone).
You can easily create your own crash report. Basically this is what you have to do:
In your App class add an handler for the UnhandledException event
inside the handler prepare a log with everything you need (stacktrace, memory allocated, etc.)
use an email composer Task to send the report.
You can also check BugSense which is a cross-platform(iPhone,Android and Windows Phone) tool that collects and analyzes crash reports from mobile apps.
Disclaimer: I have developed the WP7 plugin.