anyone cannot have the access to it or cannot modify the file .
why i am saving my information in the file t.
so , can anyone extend their help.
Thanks in advance.
anyone cannot have the access to it or cannot modify the file .
why i am saving my information in the file t.
so , can anyone extend their help.
Thanks in advance.
I would suggest instead of putting inside the text file. You can encrypt the content which needs to stored in the text file and store it inside DB.
If you want to store 1 store as 2 in DB. while retreving from DB convert 2 to 1.
So even if user has access to DB they wont be able to get the encryption logic which you have written
If you want to hide file in Android or any Linux based system just add . as prefix to folder or file name.(This will prevent Android's media scanner from reading your media files and including them in apps like Gallery or Music.)
Use below code:-
public void hideFile(File file){
File dstFile = new File(file.getParent(), "." + file.getName());
file.renameTo(dstFile);
}
just rename your file to ".r" instead of r , and file is hidden since its name begin with "." so use as below FILE *licenseFile = fopen(LICENSE_LAUNCH_TIME_FILE_PATH, ".r");
Hope it will your problem and One thing the file is shown in some specific app which can display hidden file
It doesn't matter where you store the lic file on the device a determined user can open up any file sdcard ( a root user can open any file in your system). the best way is to create a simple webserivce to record user time and check back later Or store the data in sdcard in encrypted file ( but if remember user can always delete file ). If you are serious licensing try some topics like "google cloud backend for android ", "google app engine" etc, of course it will add more effort but you will have more flexible and future ready application.