Software Archive
Read-only legacy content
17061 Discussions

intel.xdk.cache.addToMediaCacheExt bug

erik_a_1
Beginner
300 Views

Hi!

 

I would need help. I think I found a bug in the framework. I am using intel.xdk.cache.addToMediaCacheExt method to download content from web.

After the content is downloaded the frwamework assigns for every donwloaded content a new local url:

remote url: www.xxxxxxx.com/xxxxx.txt ;

the local url will be:

file:///data/data/app.com/_mediacache/0.txt

 

So it seems the local urls are converted numbered file names:

0.txt

1.png

2.mp3

and so on.

It's working.

BUT: I start my application, donwload my content first time, it is ok. After when I terminate my application and restart it, and download some other content with the above written method and the local url's will be the same (0.txt, 1.png, and so on), which means the numbered file names will be the same, so the previously downloaded content will be overwritten by new file with the same name.

The remote urls are everytime different and I am using different unique id:

var uniqueID=Math.floor(Math.random() * 100000);

intel.xdk.cache.addToMediaCacheExt(acturl1,uniqueID);

where acturl1 is everytime different file names. But still the local urls are the same.

Can you help me how to solve this, because it seems to be buggy.

 

Thank you

 

 

 

 

0 Kudos
2 Replies
erik_a_1
Beginner
300 Views

Additional information:

- in the app preview the same problem on the device

- after building an apk for andorid the same problem on the device

 

Thank you

0 Kudos
PaulF_IntelCorp
Employee
300 Views

Try searching our primary forum for a few tidbits, I'm not that familiar with this particular API, and there are many more answers on the other forum. This forum will become the primary forum later this year or early next year, when we resolve our single sign on backend system.

Try this in a Google search bar: "site:forums.html5dev-software.intel.com addToMediaCacheExt"

0 Kudos
Reply