Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to pass data from database to another activity?

$
0
0

I'm trying to create a login system, that the user who logged from it will go to the new activity when user clicked the login. The user will redirect to the 2nd activity and all of the users detail will also get from the database.

I'm using Put extra, Get extra and JsonConvert.
it's working if i add the data hard coded.

ex:
info newInfo = new info{
id = 1,
username = "spongebob"
};

Intent intent = new Intent(this,typeof(Activity2));
intent.PutExtra("info", JsonConvert.SerializeObject(newinfo));
this.StartActivity(intent);

but what if i want to get the data from the database?
thanks in advance :)


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>