Discussion Board

Discussion Board

How to delete common file on reinstallation English Forum > Discussion Board

  • Reply 4
  • View 1610

I sent my application for testing and got it back with failed sign. One of the reasons is that files that my application creates, file .data for saving some variables, dont get deleted when application gets reinstalled. 


Use of that file is to load 3 variables and use them to change appearance in aplication, and when app is reinstaled when app loads appearance gets changed. I guess that TV does not delete files upon reinstalation.


Thanks in advance.


Cheers

TAG FILE API

What do you think about this article?

UP 0

DOWN 0

BOOK MARK 0

RE :

Follow the below given steps to delete common application files -

 

  1. In config.xml file, add the following line:

    <deleteJS>[MyReset]</deleteJS>
  2. Create the file [MyReset].js in the main application folder.

  3.  

  4. Put your reset code inside the function [MyReset].reset() (the class name needs to be the same as filename and config tag value, the function name needs to be 'reset' to be recognized by the Widget Manager).

    This function will be automatically triggered during the application uninstall. However, there is no possible way to access any other application scripts from that file, so all the necessary variables, filenames, etc., need to be initialized directly there.

For more details, refer http://samsungdforum.com/Guide/tec00111/index.html

RE :

Hello,

The common file will be deleted automatically if you're place it inside a folder named curWidget.id


var filePath = curWidget.id + '/save.data';


But first you need to create the folder using createCommonDir(); Hope this can help


Regards,

I Made Krisna



RE :

quote

This has been quoted from [duser2702]'s post.

Follow the below given steps to delete common application files -

 

  1. In config.xml file, add the following line:

    <deleteJS>[MyReset]</deleteJS>
  2. Create the file [MyReset].js in the main application folder.

  3.  

  4. Put your reset code inside the function [MyReset].reset() (the class name needs to be the same as filename and config tag value, the function name needs to be 'reset' to be recognized by the Widget Manager).

    This function will be automatically triggered during the application uninstall. However, there is no possible way to access any other application scripts from that file, so all the necessary variables, filenames, etc., need to be initialized directly there.

For more details, refer http://samsungdforum.com/Guide/tec00111/index.html

 Thanks you. It helped...
Sorry for replying so late. I did not look at my thread.

Again thanks very much :d



RE :

quote

This has been quoted from [im.krisna]'s post.

Hello,

The common file will be deleted automatically if you're place it inside a folder named curWidget.id


var filePath = curWidget.id + '/save.data';


But first you need to create the folder using createCommonDir(); Hope this can help


Regards,

I Made Krisna



 Thanks for reply, again sorry to you also for replaying so late.

 Best regards