App requests permission from the user upon start and it automatically restarts for that specific OS only. That works properly for the app to detect OBB file. But our game has a downloader system that pulls the files from internet to unlock more levels and it seems like I have to restart the app every time a file has been downloaded for the app to recognize it..any clue?
Yes, indeed the files download (zip files) but the unzipped folders are empty when attempting an unzip. The folders should have media in them. For Android OS 6.0 marshmallow.
Related
I used my mobile phone sometimes as debug device and an emulator whose has PlayStore but only that, nothing more, not even my account from Google. So upon trying to update A.S. it started taking longer, so I take a look at it and he is listing files from my mobile phone that was not connected via USB to the computer neither other ways.
What does my phone files has to do with android update? And the updates is taking forever running through all files from my phone, it appeared system/ WhatsApp/ Downloads/ etc with files I know for sure are only in my personal device not the emulator.
Why does A.S. list these files on Update?
There was a copy of my files inside \AppData\Local\Android\Sdk\platform-tools\ and AndroidStudio maybe thought it was important to look at it. Resolved by removing the files inside the folder with my name.
I have an android app running on Chromebooks. I'm using FileObserver to watch a few common directories and notify changes. This is successful in all locations except the downloads directory on my chromebook.
Downloads directory on this specific chromebook is /storage/MyFiles/Downloads. Do chrombook downloads directories have special protections? (are we not allowed to monitor there?)
If this is a security issue or otherwise intentional and you have a source, please share it
This is how the device filesystem looks in AS:
I have a FileObserver observing ALL_EVENTS (for test purpose) on a folder in the external storage.
The FileObserver will trigger for any events originating from the tablet. For example, if my application or another application on the tablet creates a file in this folder, it works fine.
However, on the newer Marshmallow system, when copying files with MTP nothing is triggered. Same if I copy files with the shell. Everything used to work on our previous Lollipop system.
Any idea why this would happen?
I want to know,
What happens to app data/database files/ etc while moving app from internal storage to SD card and vice versa?
Also I have an app which is installed in external storage. Im upgrading the app. The latest version of the app has flag to restrict install only in internal storage.
Will this latest app get installed in internal storage? Will the system automatically move the app data from external to internal or the data from previous installation is lost?
Actually this does not seem a programatic question is more an Android OS question.
First. As developer you don't choose HOW your app is installed, but since Android 2.2 you can choose WHERE:
Existing applications that were built prior to API Level 8 will always install on the internal storage and cannot be moved to the external storage
Since android API 8:
android:installLocation
internalOnly: Install the application on internal storage only. This will result in storage errors if the device runs low on internal storage.
preferExternal: The android system tries to install the application on external storage. If that is full, the application is installed on internal storage.
auto: Let the Android system decide the best install location for the application. The default system policy is to install the application on internal storage first. If the system is running low on storage, the application is then installed on external storage.
As long as you programatically don't define the installation / moving process, Android operating system will take care of moving (if possible) from internal to external and viceversa. But as programmer you must be carefull with the type of app you are developing to know if you should or not allow this option
Warning: When the user enables USB mass storage to share files with a computer or unmounts the SD card via the system settings, the external storage is unmounted from the device and all applications running on the external storage are immediately killed.
What happens: As long as you don't decide, let's explain in a simple way.
All files of the app are moved to sd card except one little pointer in the internal storage that tells the system where the app is located. (imagine if you format your SD card manually, then your phone won't know app has dissapeared) but if you unmount it phone won allow you to access.
Second Application updates will by default try to retain their install location, but application developers may change the installLocation field in an update. Installing an application with this new attribute on older devices will not break compatibility and these applications will be installed on internal storage only. That means, older data will be moved as long as the app remains with same identifier (and signature if market app).
Source / Source
ADVANTAGES / DISAVANTAGES
To keep / update your database files / configuration when upgrading your app check here and here
Im using a Camera intent to create a picture file in internal storage on android. This picture is saved in the app directory as
/data/data/com.company.app/files/test.png
This works fine, the picture is there.
When I with CCFileUtils then tries to check if the file exists (using js interface):
cc.FileUtils.getInstance().isFileExist("/data/data/com.company.app/files/test.png")
it returns false. Opening the file with CCSprite is totally hopeless too.
The owner and group of the app is the same as the app itself(i.e. "com.company.app"). The read/write permissions of my file is rw-rw-r.
EDIT: Adding information to add information.
The device from which I've extracted the information is a rooted Samsung Galaxy S running Cyanogenmod 11(exact build number: 11-2014112-SNAPSHOT-M12-galaxysmtd) which is built on top of android version 4.4.4.
Its internal storage so its the device own storage. That means it can't be on a sdcard if Im correct, im not sure, but its not removable media anyhow and its not in a sdcard folder on the device.
I've also tried to do the same on a 1+ one running CM11(exact build number: 11.0-XNPH44S). This device is not rooted so I can't check it's filesystem. But it seems to handle it the same way.