Accessing db file while debugging on real device - android-sqlite

Is it restricted (security reasons etc.) or something wrong with my dev environment? I can't see inside "data" folder.

Answer from here:
If you are using an actual device, you will not be able to see or access it from outside unless you root your phone.
If you are using the emulator, the DDMS view will let you navigate to it and pull it from there.
Or, you could have an issue with creating your DB. Without seeing your code we cannot tell.

Related

"XHR failed" can't download any extension

So recently I get this error "XHR failed" while trying to download extension and I already try a lot of things changing the setting but still it cant work. So I decided to try difference wifi (mySchool) and network(mobile data) and I'm shocked it's working fine. So, I guess the problem is on my own wifi. How to deal with it? I've been stuck for 2 days 🙂.
I use the latest VS CODE version on Windows 11.
I try a lot of things to fix it and been through github and stackoverflow too from `proxy setting,firewall,DNS,restart router,restart laptop also i tried everything in this question too and all but
"XHR failed"
keeps appear and as I said before without changing any setting but only changing wifi it works fine. So, I hope there's a solution on my wifi.
this is the error msgs on therminal:
enter image description here
Updates:
I'm running the same project at home and school.
I'm using the same laptop at home and school
By "mobile data", I mean hotspot from my cell service (vs. Wifi).
The projects ONLY works for wifi at school and from my hotspot.
It does NOT work from my home wifi.
It fails not only for remote explorer, but the other ones too.
I can't try to reload the extension that I want to download. The error always occurs, not only on Remote Explorer.
The other problem is "can't connect to discord via RPC: Error: could not connect"
Your problem is the same as discussed in this thread:
Visual Studio Code "Error while fetching extensions. XHR failed"
Unfortunately, there are several DIFFERENT possible root causes, and several different workarounds and solutions discussed in the thread.
You said you "tried several things". Please Update your post and specify exactly WHAT you tried, and the results.
You said it "works" on certain networks, but fails on your (home? school? other?) network (whether or not the network is "wifi" or not probably doesn't matter). Please clarify exactly "what's different" between the networks (to the best of your knowledge).
Please specify the platform you're running VSCode on (windows? MacOS? Linux? Other?)
Try this (one of the responses in the SO thread I cited above):
https://stackoverflow.com/a/71456820/421195
press f1
search "user setting"
click enter
search on user setting "proxy"
click enter
look for "use the proxy support for extensions."
change "override" to on
Q1: You're running the same version of VS Code, on Windows, using the same project, at home and at school, correct?
<= Q: Are you using the same PC (e.g. carrying a laptop from home to school), or are you using different PCs at home and at school?
Q2. By "Mobile data" (vs. "wifi"); you mean you "hotspot" for your cell phone service, correct?
Q3. The project ALWAYS works for Wifi (either at home or school), but NEVER works for your Hotspot, correct?
Q4. You're always trying to run the Remote Explorer extension in VS code when the error occurs (it never happens with other VSCode activities), correct?
<= Q: Any problems in other areas of VSCode (e.g. your compiler)?
Q5. The exact error message is The editor could not be opened due to an unexpected error: XHR failed, correct?
<= Q: Always using Remote Explorer, correct? What exactly are you doing in Remote Explorer?
BE SURE TO TRY ALL THE TROUBLESHOOTING TIPS HERE
(including verifying "ssh" from the VSCode command line, using your "bad" network):
https://code.visualstudio.com/docs/remote/ssh
I found the solution for my problems. it solved by using vpn.
the problem was my wifi provider probably blocking the request on vs code, seems like there's something fishy about the DNS policy. Hope this can help too

grant OSX sandboxed finder sync extension persistent write access

I've written a short swift code to add a button to the finder which creates a new blank file at the current directory via a system touch call. The extension gets the current directory fine (via FIFinderSyncController.defaultController().targetedURL()), but the touch command failed due to sandboxing. How do I ask for permission for the write access? The user-selected file option is not triggered for my code.
As far as I know this should not be possible within Finder sync extension. However, as the workaround you may transfer this functionality to the main application - first ask user to drag drive, where functionality will be enabled, to the app main window, save security bookmark, and then send command from Finder extension to the main app.
You should be able to use a temporary exception entitlement as described here. More specifically, one of the two entitlements should be sufficient:
com.apple.security.temporary-exception.files.home-relative-path.read-write
com.apple.security.temporary-exception.files.absolute-path.read-write
As noted in the documentation, you should submit your reasons for needing a temporary exception entitlement if you plan on submitting your app to the App Store. (I've never gone through this procedure, so I'm not sure how what this process is like).
As far as I know, this isn't possible, and furthermore, this is not the purpose of Finder sync extensions. Apple says here that:
Make sure the Finder Sync extension point is appropriate for the functionality you plan to provide. The best Finder Sync extensions support apps that sync the contents of a local folder with a remote data source. Finder Sync is not intended as a general tool for modifying the Finder’s user interface.
If you want to modify Finder to do what you purpose, you'd have to:
Use a temporary exception entitlement, which will de facto cause your app to be rejected; or
re-think your approach
I'd suggest the latter. Apple is making it more and more difficult to modify the system with every release (for better or for worse). If you need this functionality, file a bug report requesting it.

Visual studio online source control breaks debugging

I'm completely new to source/version control and I recently decided to try out the Visual Studio online service (the renamed TFS online service). I ran into a problem and now I'm not sure if I'm doing something wrong or is the VSOnline service faulty.
Problem is as follows:
Completely working Windows phone 8 project. Compiler and debugger working as expected in VS13 ultimate (also in VS12 pro).
However, when I add the project to source control and check it in. Then check it back out it breaks.
Symptoms:
1) XAML markup not recognized. IntelliSense reports error for every single XAML tag, even fundamental tags like Phone:PhoneApplicationPage. These errors can be cleared if I change from debug to release mode, but they re-appear when I launch project next time.
2) Debug target not changeable. In the dialog where you can typically choose between device and different emulator modes there is only one option "start". Impossible to deploy app on actual device. "Start" always launches default emulator (which works fine, no bugs there), but you can't choose which emulator.
3) VS13 crashes when I try to open debug tab in project properties/settings.
4) Attempt to build the solution in VSonline fails.
I realize there is a possibility I'm doing something wrong. Never used source control before, but in my understanding I still should be able to handle the project completely normal after check-out. Restrictions to debugging or deploying to device would seem counter-productive to me.
And also the false errors and VS13 crashing in settings implies there is something broken.
Any opinion, advice or help will be hugely appreciated.
After few days of relentless effort I was able to solve the problem.
As I work from home and my own computer, I'm always logged in with my personal account.
And I was logged in visual studio with my work account which has the MSDN subscription.
This caused account clash and all the odd behavior. Logging out from all browser didn't help, it mysteriously kept my personal account always logged in. And I believe this is caused by Skydrive.
So I set up new user account for my work id, log in using that and all started working perfectly.
Bottom line: If you wish to use visual studio online or log in in VS, make sure you are logged in with same account on the computer.

Specify build folder for iphone application

I've written an app that uses some of the user's camera roll images, and while it does so it stores them in the application root directory. The problem I have is that whenever I re-compile my application it changes the folder to which the application is installed.
Is there any way I can specify which folder it should build to, so that any path information stored during it's last run will still be valid?
I don't think that this is something you can stop Xcode from doing unfortunately. It should be copying the data from the old location to the new one but sometimes that just doesn't happen.
The answer suggested in this question looks like the solution you are after.

ClickOnce and UserSettings

Ok, I have a ClickOnce app that I'm testing and I ask the user for a couple of pieces of information the first time they use load the app; Customer Id and Name. I then set the Properties so that they'll be saved across sessions. The property is Properties.Settings.Default["Customer ID"] and similar for name.
So I uninstall the application through control panel and reinstall the application but the settings are still there! I go and find all directories for my application and delete out the settings but the application acts like it still has them. I can even step through the debugger and see that they are still there.
How do I get rid of them all? This is very frustrating since it makes it almost impossible to test new data and to debug any first time installs.
Thanks...
I believe the user config values are stored in this location:
%APPDATA%\<AppName>\<AppName><AppConfigName_GUID>\<AssemblyVersion>\user.config
Have you checked there?
ok, in case anyone has the same problem in the future. I had set the properties in Visual Studio through the Settings.settings editor. I removed them and everything was normal again...
In answer to the general problem of removing settings when the program is reinstalled, you could add unique piece of data as well, such as the date of the executable, its checksum, or something similar.
Then check that against the saved data when you program starts. If they don't match, it's a reinstall and you can delete the stored data.