Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 57

Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
04/06/14 12:05 AM (10 years ago)

Android: where do these file reside.

Trying to find out where these files reside in the android file system. //file names for apps cached configuration file public static String cachedConfigDataFileName = "cachedAppConfig.txt"; public static String cachedConfigModifiedFileName = "appModified.txt"; from appdelegate java One file holds all the configuration data associated with the application. This file must exist in the assets/ folder in the Eclipse project. This file is normally named BT_config.txt and can be read / edited with a normal text editor. If this configuration data uses a dataURL, a remote server will be polled for content changes. Changes will be downloaded and saved locally. Once this happens, the bt_config.txt file is no longer used and instead the application refers to it's newly downloaded and cached data. ":^) thanks for any help.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/06/14 12:21 AM (10 years ago)
Typically they're held in your app's cache directory. 'where' is the app cache directory? Let me know when you find out. I use BT_fileManager to access the directories, but I've never actually been able to browse one. If you need to 'reset' your app to 'default', use your Android app manager and either delete the app and reload it from scratch, or there is also an option to delete the cache, which will wipe out the BT Cache directory, and force a fresh start. Hope this helps! Cheers! -- Smug
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
04/06/14 11:02 AM (10 years ago)
thanks Smug. I did look in the app cache directory of my app. & I found files in there, but not the txt files that are listed as in the app delegate comments. These cached files all ended in .o or .m but nothing ending in .txt. So still wondering where they might be. Hmmm.... any Androidites out there know?
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
04/06/14 12:17 PM (10 years ago)
little confused here..This not in the control panel as a link in global or themes? LA
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
04/06/14 12:24 PM (10 years ago)
Like this: This file is normally named BT_config.txt and can be read / edited with a normal text editor. If this configuration data uses a dataURL, a remote server will be polled for content changes. Changes will be downloaded and saved locally. Once this happens, the bt_config.txt file is no longer used and instead the application refers to it's newly downloaded and cached data. In other words, if a dataURL is used then the configuration file in the Eclipse project is only referenced so it can find the buzztouchAppId, buzztouchAPIKey, and dataURL. After that, it uses the data that was saved from the URL. If no dataURL is provided, the file in the bundle will be read and parsed everytime the app is started. LA
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
04/06/14 12:40 PM (10 years ago)
CachedAppConfig.txt files should be on the phone. I want to programmatically access and read / write to them. If they are text files as noted in the app delegate should be no problem once I find them. Anyone know? They are named CachedAppConfig.txt and appModified.txt.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/06/14 05:20 PM (10 years ago)
Patrick, I'm curious how you were able to browse your app cache directory? I could be missing something (which is entirely possible) but I haven't been able to actually 'find' or browse my cache directory. I've only been able to use the BT_fileManager method "doesFileExistInCache" to see if something was in there… programatically. And I've found my 'file' cannot be read from BT_Docs, I have to physically move it into cache to get access to it. Cheers! -- Smug
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
04/06/14 09:06 PM (10 years ago)
I have the Android directory in file manager. In there I have data and then all the directories of apps. Such as com.westernslope. in that directory I find cache, testdata and debug. Testdata and debug are empty but cache contains about 10 different cache files.they are not text files.it appears this isnt the cache directory I need to use/find. I will probably hsve to use BT_fileManager like you suggested.I see how to access from reading the java code. But I would like to know where those 2 txt files reside.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
04/06/14 11:32 PM (10 years ago)
That's usually my problem as well. It's all definitely 'know before you go' kind of methods with java. You can always see if they're there by using a debugger statement in your 'home' screen somewhere… something like: boolean fileExists = BT_fileManager.doesCachedFileExist("appModified.txt"); BT_debugger.showIt("appModified exists: " + fileExists); fileExists = BT_fileManager.doesCachedFileExist("CachedAppConfig.txt"); BT_debugger.showIt("CachedAppConfig exists: " + fileExists); If you find what you want, and you just want to take a look at it, you can run a couple of the BT_fileManager commands like: copyAssetToCache("BT_Docs", "yourFileName") to get it into the cache directory, and then copyFileFromCacheToSDCard("yourFileName") and from there you can look at it. I've noticed every now and again that in 'some' (but not all) files they'll append the app GUID to the filename… Cheers! -- Smug
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
04/07/14 09:06 AM (10 years ago)
Thanks for the info. very helpful.... kind regards Patrick
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.