I am creating an app with a html, css, js inside a webview, and also several databases to store data. My app is designed to be used for 10 to 11 hours each time.
A big problem was found that android will kill my app in background after leaving for a while. However, app gets killed will lead to a big problem as it means the whole task has to redo again. I have to maintain OR rebuild the connection between database and android to ensure my app can keep running smoothly.
I would like to know:
1.) is there any way to maintain the connection between database and android (e.g. put it in foreground service?) so that killing app will not affect the connection?
2.) can I ask android and js to rebuild the connection (e.g. synchronize the database?) between android and js after the app get killed by OS?
Here is my MainActivity:
I am creating an app with a html, css, js inside a webview, and also several databases to store data. My app is designed to be used for 10 to 11 hours each time. A big problem was found that android will kill my app in background after leaving for a while. However, app gets killed will lead to a big problem as it means the whole task has to redo again. I have to maintain OR rebuild the connection between database and android to ensure my app can keep running smoothly. I would like to know: 1.) is there any way to maintain the connection between database and android (e.g. put it in foreground service?) so that killing app will not affect the connection? 2.) can I ask android and js to rebuild the connection (e.g. synchronize the database?) between android and js after the app get killed by OS? Here is my MainActivity: [code]public class MainActivity extends AppCompatActivity { HTMLDataBase myDB1; ContentTableDataBase myDB2; CloudTableDataBase myDB3; InterviewDataBase myDB4; Context context; boolean check; private WebView view;
I am creating an app with a html, css, js inside a webview, and also several databases to store data. My app is designed to be used for 10 to 11 hours each time.
A big problem was found that android will kill my app in background after leaving for a...
Я один ух в самообучении C# и Unity. В настоящее время я занимаюсь казуальной разработкой игры. Я хочу хранить данные в базе данных. У меня установлена последняя версия Visual Studio и MySQL Server Management Studio.
Я успешно подключил свою...
Я один ух в самообучении C# и Unity. В настоящее время я занимаюсь казуальной разработкой игры. Я хочу хранить данные в базе данных. У меня установлена последняя версия Visual Studio и MySQL Server Management Studio.
Я успешно подключил свою...
Соединение MySQL зависло, и код не получил никакого ответа, см. код ниже.
Пожалуйста, помогите, что мне делать.
Я тоже изменил драйверы и попробовал, но все еще застрял в методе driver.getconnection. Вот код, который не печатается под строкой «База...