I coded an android app that has its background service to do data syncing when app is not running. How do I modify files in internal mem or records in an sqlite dbase of an android app using the service.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You do the same as if your in a normal application , since you are passed in a
Context. One important point I want to point out is, if your Application starts up and yourServicealso starts up and both needs to use the database, then you will need to make sure there will be no conflict. You can simply store your instance in your sub-Applicationclass to make sure only one instance of the database was created.