How do I implement file cache for exoplayer - Java for Android App Development

Just as title says what's best and easiest way to create file cache for exoplayer?

Good question. I think it should go as part of custom implementation of DataSource.
What kind of data do you want to cache?

Related

File system cache size

Just want to know what size(setting) you all have for file system cache, I have mine on 4mb, start up seem fast. Anyone have set it to a higher setting and notice any different?

Android question

I've been searching and searching and really couldn't find a clear answer.
I flashed my phone using method 1 as described in this thread http://forum.xda-developers.com/showthread.php?t=593786
Now I am seeing this other I guess they are android releases like http://forum.xda-developers.com/showthread.php?t=591104
They post these sqsh files. I already got my phone flashed and running Android is there a way I can upgrade or do whatever I need to do to use the sqsh file in the link I mentioned above? I can't find any clear instructions on how to do this really.
Thanks!
Yes, put the system.sqsh file on your SD card, and create a file called 'systemtonand', when you reboot, the bootloader should pick up that you want to transfer the file and do it automatically.
you may want to add blank file "cleardata" to delete your current data file to prevent conflicts (some system files store items in the data file that may not agree with another system file). there is a cache that, alternatively, can be cleared to avoid deleting your data file, have not tried this, another use posted it but I don't recall which thread.

Extract HTML source code from Android Browser

i would like to extract the HTML source code of websites viewed in the Android Browser. Is there an API that offers this functionality?
Thank you
How about access to the Browser's cache? Is there a way i can check if the site's HTML file is saved in the cache?
marvingo said:
How about access to the Browser's cache? Is there a way i can check if the site's HTML file is saved in the cache?
Click to expand...
Click to collapse
If browser doesn't give you such API, then you could try to find this data in its files, but... it's unreliable solution, because cache format may change in the future.
Brut.all said:
If browser doesn't give you such API, then you could try to find this data in its files, but... it's unreliable solution, because cache format may change in the future.
Click to expand...
Click to collapse
That is what I am afraid of. How about creating an Browser Extension to parse the HTML file? I know, im pushing it. But i cannot afford to write a program knowing that the format might change in the future.

[Q] N00b stupid (?) questions.........

First, what is that "deodexed" thing? Can anyone explain it in plain English? I was pretty good addict flashing Roms on my Nexus 1, but am kinda afraid to do anything with my new Dx, for unknown (to me) reason.
Also, i have heard or read somewhere that if i wipe everything in recovery, before flashing new "zip", i will be stuck at M logo forever.....is that correct?? I would appreciate anyone who can explain these.............ty.
WOW!!! Almost 60 people read this and nobody knows what they are doing??? OMG, i did not realize that we all are N00bs here................
Deodexed my friend is the past tense for deodex. Ha I have no clue
Sent from my DROIDX using XDA App
Uhm...its actually the opposite of "odexed"...=]
Sent from my PC36100 using XDA App
deodexed means you can install themes, dont worry any more about that. And a quick way to check is look in your system/framework there shouldnt be any odex files. if you installed the ota YOU ARE NOT DEODEXED, you must of installed a deodexed build or deodexed yourself
bad4u6669 said:
deodexed means you can install themes, dont worry any more about that. And a quick way to check is look in your system/framework there shouldnt be any odex files. if you installed the ota YOU ARE NOT DEODEXED, you must of installed a deodexed build or deodexed yourself
Click to expand...
Click to collapse
Thank you for the answer, but THAT i already knew. What i do NOT know is, what does it do? And what about that Recovery, can i wipe everything before flashing new zip, or do i have to do it, or should i do it?
fuzio1963 said:
Thank you for the answer, but THAT i already knew. What i do NOT know is, what does it do? And what about that Recovery, can i wipe everything before flashing new zip, or do i have to do it, or should i do it?
Click to expand...
Click to collapse
Deodex:
What bad4u6669 was saying is that is all you really need to know... the technical part is irrelevant really. In simple terms... deodex combines the classes.dex in the odex form of an application to it's corresponding .apk. So say you have INeedMoney.apk & INeedMoney.odex... the .odex part is broken down and then recompiled into the .apk.
.odex i supposed to make your phone more "efficient" and what not... and that's why companies use it, but in the dev world... it's not that big of a difference. It's WAY more easier to theme .apk files over .odex. So that's why devs only theme .apks and thus everybody who wants them must deodex there phone.
Recovery:
Wiping is a good way to clear all the garbage from your phone of an old build so the new stuff/information/apks can install cleanly. Now I always wipe the system and cache because those are the main things that are being flashed or rewritten most of the times. I try to stay away from wiping data (your user apps and accounts info) for obvious reasons. Only time I do wipe data is if it caused problems with the installation/flash.
Only time I can see to NOT wipe system is when you are told to be the person who is supplying you with the flashable.zip. Sometimes if it's minor updates to the system... you can save time by not wiping OR wiping will make you lose some vital information. If so, the dev who uploaded the flashable .zip will clearly state not to wipe.
Only in that case I would not wipe my system.
This is just my 2 cents on the questions that were asked.
Maybe this?
MrDanger said:
Deodex:
What bad4u6669 was saying is that is all you really need to know... the technical part is irrelevant really. In simple terms... deodex combines the classes.dex in the odex form of an application to it's corresponding .apk. So say you have INeedMoney.apk & INeedMoney.odex... the .odex part is broken down and then recompiled into the .apk.
.odex i supposed to make your phone more "efficient" and what not... and that's why companies use it, but in the dev world... it's not that big of a difference. It's WAY more easier to theme .apk files over .odex. So that's why devs only theme .apks and thus everybody who wants them must deodex there phone.
Recovery:
Wiping is a good way to clear all the garbage from your phone of an old build so the new stuff/information/apks can install cleanly. Now I always wipe the system and cache because those are the main things that are being flashed or rewritten most of the times. I try to stay away from wiping data (your user apps and accounts info) for obvious reasons. Only time I do wipe data is if it caused problems with the installation/flash.
Only time I can see to NOT wipe system is when you are told to be the person who is supplying you with the flashable.zip. Sometimes if it's minor updates to the system... you can save time by not wiping OR wiping will make you lose some vital information. If so, the dev who uploaded the flashable .zip will clearly state not to wipe.
Only in that case I would not wipe my system.
This is just my 2 cents on the questions that were asked.
Click to expand...
Click to collapse
Now, those are the answers!!
Thank you, i am "smarter" now.

Removing cache from Android files

Hi
I removed an app from my phone
I connected my phone to my computer and checked if there are any left over files, and yes there are
I am trying to remove the app folder in Phone->Android->Data
It gives me this error: "cache_blablabla cannot be removed: the storage location is write protected. Remove the protection and try again"
Could I somehow get administrator permission so I can remove it?
denniserino said:
Hi
I removed an app from my phone
I connected my phone to my computer and checked if there are any left over files, and yes there are
I am trying to remove the app folder in Phone->Android->Data
It gives me this error: "cache_blablabla cannot be removed: the storage location is write protected. Remove the protection and try again"
Could I somehow get administrator permission so I can remove it?
Click to expand...
Click to collapse
Any time you add or remove apps(especially apps in the system partition), you can boot the device into stock recovery mode and select the "wipe cache partition" option, then reboot. This is necessary because left over cached data from apps that are no longer there can cause conflicts with your device functioning properly.
When the device reboots, it will rebuild the cache as it needs and everything will work like it is supposed to.
This will wipe all cached data on your device, this does not remove your personal files or anything else important, it is not the same as factory reset, it only wipes the "live" data that the app has stored/loaded in the background while the device is on. Similar to clearing your RAM space on PC, it doesn't wipe the user data or any other data from your harddrive, it just dumps what is in your RAM.
One other thing, the Android/data folder is a necessary folder, that is where it stores app data for ALL of the apps that you installed. If you look inside that folder, you will see other folders, each of these other folders is a folder for each individual app that the phone is storing data for.
What you are actually probably looking for is how to remove that data that was associated to the app that you removed. That can be deleted using your phones file manager. Just open your file manager on your android device, select your internal storage. There you will see the Android folder, open it, then you will see all the folders for the individual apps. Find the folder there that is associated to the app that you removed. When you find it you can delete it from within your file manager app.
You don't need a PC, ADB or any other apps or fancy special tricks to delete folders that are stored within the Android/data folder.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
Any time you add or remove apps(especially apps in the system partition), you can boot the device into stock recovery mode and select the "wipe cache partition" option, then reboot. This is necessary because left over cached data from apps that are no longer there can cause conflicts with your device functioning properly.
When the device reboots, it will rebuild the cache as it needs and everything will work like it is supposed to.
This will wipe all cached data on your device, this does not remove your personal files or anything else important, it is not the same as factory reset, it only wipes the "live" data that the app has stored/loaded in the background while the device is on. Similar to clearing your RAM space on PC, it doesn't wipe the user data or any other data from your harddrive, it just dumps what is in your RAM.
One other thing, the Android/data folder is a necessary folder, that is where it stores app data for ALL of the apps that you installed. If you look inside that folder, you will see other folders, each of these other folders is a folder for each individual app that the phone is storing data for.
What you are actually probably looking for is how to remove that data that was associated to the app that you removed. That can be deleted using your phones file manager. Just open your file manager on your android device, select your internal storage. There you will see the Android folder, open it, then you will see all the folders for the individual apps. Find the folder there that is associated to the app that you removed. When you find it you can delete it from within your file manager app.
You don't need a PC, ADB or any other apps or fancy special tricks to delete folders that are stored within the Android/data folder.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
Wow, thank you a lot!
Can I do that without rooting my phone?
And I am doing it because there's an app that gives away something free, you can use it max. 5 times and then you have to purchase. So I thought it'd be a good idea to remove everything associated to that app what might makes it possible to give me the free stuff again, haha
Do you know if it's even possible by removing those files? And if it isn't, do you maybe know where I should be looking at?
denniserino said:
Wow, thank you a lot!
Can I do that without rooting my phone?
And I am doing it because there's an app that gives away something free, you can use it max. 5 times and then you have to purchase. So I thought it'd be a good idea to remove everything associated to that app what might makes it possible to give me the free stuff again, haha
Do you know if it's even possible by removing those files? And if it isn't, do you maybe know where I should be looking at?
Click to expand...
Click to collapse
It is pointless for you to even try, the information that keeps track of how many times you've done it is probably stored online somewhere in some server for the developers/owners of the app.
Sent from my SM-S767VL using Tapatalk

Categories

Resources