php - Is it possible to insert the data inside sharedpreference into mysql database? -


is possible insert data inside sharedpreferences remote mysql database? insert product specific user logged in or maybe know better way doing that. using sharedpreferences login session.

if know tutorial please kindly share, need in project , new android development.

yes, can.

first: retrieve data sharedpreferences:

sharedpreferences sp = preferencemanager.getdefaultsharedpreferences(myactivity.this); integer myvalue = sp.getint("mykey", 0); 

then: insert returned value database:

this tutorial shows how perform insert mysql database: http://sampleprogramz.com/android/mysqldb.php

hope helps.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -