android - Passing database connection between intents -



android - Passing database connection between intents -

i`m should database connection if alter intent ?

for illustration have mainactivity list of records , button. when click button im starting new intent (addactivity). in mainactivity ive opened database connection display records. want add together new record in addactivity need connection. should ? honest see 2 solutions

1) close connection while invoking new intent , in addactivity open again

2) pass theconnection addactivity. don`t know how

or maybe should in other way ?

close connection. improve practice close connection , open seek maintain open between activities.

android database sqlite

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -