I want to go to a certain folder in the application I wrote in android studio.I want to go where my folders are.I want to go back to where the folders are in not accessing the data in it. for example "my files - internal storage - downloads". I want to open it. Would you suggest a source way or function, which I can use for this? Thank you.
try device file explorer https://developer.android.com/studio/debug/device-file-explorer
hope this helps
Related
I'm trying to make launcher for my game. I want it to display update log. How I want it to work:
Replace log.txt file on Google Drive and new log will be displayed in launcher.
I have no idea how to make this. Also I have to make auto-updater.
It will work similiar to update log - upload .jar file and res folder on drive. When game launched it will check for updates and if new update available it will download it.
Like I said, I have no idea how to do this.
I advise you to use GitHub to upload your files. Then you can use the URL provided by GitHub to open a urlStream in your project and read that file like a .txt.
Google drive is a file explorer only. It will allow you to upload and download files, it does not have the power to display or edit them. Unless you want to display them in the Google drive web application in which case there should be a webContentLink available in the response data for the file.get method, however the file will need to be either public or the user must have access to it in order to be able to see it.
To display the file you will need to download it and display it locally. To edit it you will need to download the file and edit it then upload it again.
Tbh i think what you are asking is out of scope for this api.
Alright so I have been reading Android's tutorial on how to support multiple screen sizes (https://developer.android.com/training/multiscreen/screensizes.html#TaskUseSWQuali) and I do not know what they are doing, I have gotten as far as to make multiple folders like "sw600dp" (http://imgur.com/a/PeTHW), but I do not know how to connect the XMLs to the right folder does anyone know how?! Thanks
You will see folder like "values-w820p" and many more in your project's resources folder. These are the folders that are specific to a particular screen resolution.
So for instance you put a image in the folder values-820p, when the use runs your app on such resolution device. This folder of your app will be automatically be accessed.
In short you can create folders for specific resolutions and then put images for that that resolution in these folders.
I am making a chat app that stores sent images in it's private folder on external storage. After saving an image the Google Photos app notices that and asks if the user wants to backup that folder.
Is there a way to prevent that?
'.nomedia' file does not help.
Kindof, Google backup reads imgs and video types.
There are 3 workarounds that I know,
Make the Folder hidden.
Add "." before the folder name. (when u create the folder)
Have a lot of folder hierarchy.
Example: /0/AppName/sentimgs/ <- Can be read by google backup
/0/AppName/bla/bla/bla/sentimgs/ <- Cant be read.
Save the img without an extension. And make ur app add it when they want to view it.
The Shank's first solution worked for me.
However, I noticed that I created .nomedia file wrong, so after fixing it the backup problem has been also solved.
Background
I am developing an android application that will only be used on Nexus 7 tablets (my team is also providing and has access to the hardware).
Problem
The app needs to be flexible to allow content to be added (by non-tech savvy users) to the app and accessed without an internet connection.
Our Idea
Android devices have a file system. We want to design a file system layout such that the people adding content to the application can drag and drop into the correct folder.
e.g.
AppName
Images
Videos
If the user adds a video to the videos folder of the device under our app, it will show up in the app.
We understand that this could easily go wrong (accidentally delete a folder, etc.) but this is out best attempt to solve this without having to update the app ourselves whenever new content comes up (and remember, no internet connection!).
The Question
Is it possible to access the android file system contents and insert them into an app as described in the "Our Idea" section? If so, how?
Yes. This is possible if you don't bother about content security. You can copy the content to any of the file system path in sdcard and your app can look for the folder and read the files .
Example , you can create a folder in sdcard as
sdcard/appname/media/
and create a layout to access the files in the device, and when user selects the files provide option to copy it to your sdcard/appname path.
Check this link
http://developer.android.com/training/basics/data-storage/files.html
Note : the sdcard path can be accessed if you connect to any external system ( PC).
I have small XML(KB) file in my assets folder. My application draws data from it. But then I have downloaded an updated version of the file I need to replace it somehow and I don't know how to?
Since I am developing on higher API`S I can use DownloadManager class.
You cannot replace an asset -- assets, like resources, are read-only.
Instead, you will need to adjust your application to detect if you have downloaded the replacement file and use that instead of the asset if it is available.
My solution is:before i use the assets file i delete all cache file int the path---/data/data/com.yourpackagename.xxx,ofcourse just when the app version is above the old app version.(i saved a SharedPreferences when the app first run.so i can compare the app version).
I don't know why the new app's assets resource is exist,but the solution is worked for me!
ps:my app homepage is a webview and the file in the assets,so,i need replace it each app update!