Windows Phone 8.1 - File Access From Coded UI Test - windows-phone-8.1

I'm trying to access the file system for read/write operations on Windows Phone 8.1 from Coded UI Test in order to log events and read settings files.
I'm unable to access Windows.Storage.KnownFolders due to System.UnauthorizedAccessException and unable to grant permissions due to a lack of an application manifest in a coded UI test.
I'm also unable to access Windows.Storage.ApplicationData.Current because the process has no package identity.
Any ideas on how to solve this?

Related

Windows Store 10 App Dev: Total file system access

I'm thinking of porting a desktop file launcher app to the Windows 10 store app.
So being a program launcher it would need unrestricted access to ANY folder/path/exe on the users system, it's a configurable program/argument launcher. Basically global file system access. Is this possible without the user having to choose anything?
For example the app could call: notepad.exe "f:\data\test.txt"
or: c:\program files\adobo\photoshock\photo.exe "g:\data\test.tiff"
No, UWP apps have limited access to the file system by design.
You may want to try converting you desktop app into a "modern" desktop app thru the Project Centennial.

Error Logging in windows Phone8 app

How can we log exceptions and error for windows Phone8.0 app
I also want a mechanism to delete the logs after a period of time
Is there a method other than ISO to log error
thanks in advance
Write them to files in isolated storage. You can write code to iterate over the file system to clean them up. If this is just for testing use Windows Phone Power Tools to manually remove logs.
An alternative is to build a logging service and have your devices connect and write to it when they have a data connection.

How to get crashdumps of Store Apps when Hang

we have a windows 8.1 app in the windows store that sometimes crashes or hangs and we are unable to receive reports about hangs and crashs reported by the user via the store.
Collecting of telemetriy data is enabled in the store like mentioned in this MSDN-Article(http://msdn.microsoft.com/en-us/library/windows/apps/hh967787.aspx).
So I did a crash of the app by myself, took a look in the WER-ReportArchive(%localappdata%\Microsoft\Windows\Windows Error Reporting) and found a .cab & .wer-file. So I think the report was sended to microsoft, but theres still no crash or hang documented in the Dashboard of the App Store.
I tried to get a crashdump via Windows Error Reporting - LocalDumps (msdn.microsoft.com/en-us/library/ bb787181%28VS.85%29.aspx), but this dump is only generated when an error occurs.
In my case mostly the app just hangs!
I also tried to configure Windows Error Report - Registry Entries (http://msdn.microsoft.com/en-us/library/bb513638%28VS.85%29.aspx), but it seems most of the entries are just ignored.
I noticed WER is creating a dump-file of AppHangs as well, before sending the data to Microsoft (memory.hdmp in ReportQueue). But this files are deleted immediately after sending.
Does somebody know a way to get memory dumps and further information for AppHangs as well?
Thanks in Advance.
I think you could use the posibility of Just-In-Time or postmortem debugging via setting registry key for AeDebug, if you can create the crash.
Have a look at:
Improving apps with Quality reports
https://blogs.msdn.microsoft.com/windowsstore/2012/06/27/improving-apps-with-quality-reports/
Debugging a Windows 8.1 Store App Crash Dump
https://blogs.msdn.microsoft.com/ntdebugging/2014/01/13/debugging-a-windows-8-1-store-app-crash-dump/
Configuring Automatic Debugging https://msdn.microsoft.com/en-us/library/bb204634(vs.85).aspx
Using WER: Collecting User-Mode Dumps https://msdn.microsoft.com/en-us/library/bb787181(v=vs.85).aspx
Enabling JIT-Attach Debugging https://msdn.microsoft.com/en-us/library/2ac5yxx6.aspx

Deploy WP8 app to device and save all its settings after rebuilding the project

I have accidentally killed one of my WP projects in VS2013. I receovered the source code from the backup, but now, if I try to recompile it and deploy to my device for further debugging, all my app data in the app IsolatedStodage area will be wiped (see this post).
The problem is that I have gathered some important data in my app, and need to save them for later use with newer versions of my app. Is there a way to access the file system on a WP device unlocked for development and save the corresponding IsolatedStorage files for the app? I know that it's possible for the WP8/8.1 emulator (we can mount the .vhd files), but what about a WP device? And if it it's possible, what files/folders do we need to save?
Try IsoStoreSpy.
It allows you to browse the IsolatedStorage of application on both emulator and device. You need to copy all the files from IsolatedStorage and upload them to device after updating the application.

Permission is only granted to system apps in Android Manifest

While i am inserting this permission in manifest it shows error " Permission is only granted to system apps"
Actually i used this permission for developing application based on Oauth2 token. But i cant enable this permission. Can any Help me?
MODIFY_PHONE_STATE permission is granted to system apps only.
For your information, there are 2 types of Android apps: system & user
User apps are just all your normal app installations through the Google Play Store, Amazon Appstore or sideloading. These go into the
/data partition of your Android phone, which is the part of the
internal memory made available for user data and apps.
System apps are basically the apps that come pre-installed with your ROM. In a standard Android user environment, the user doesn’t
have write access to the /system partition and thus, installing or
uninstalling system apps directly isn’t possible.
In order to install an app as a system app on your Android device,
your device must either be rooted or have a custom recovery installed (or both).
That being said, that error is actually wrong because you have a valid code and compilation should work. It would be better if it gave a warning instead. In Eclipse you can easily fix it. Just go to:
Window -> Preferences -> Android -> Lint Error Checking.
Find ProtectedPermission from the list and set the severity to something other than error(info for example). This way your project will still compile.