2016年8月11日 星期四

upload picture

14.upload picture

how to choose a picture?

need to create a image picker
1.

2.



how to make a circle image  view

Upload the profile picture
ok

need to do:
different people upload to different please

FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
if (user != null) {
   // Name, email address, and profile photo Url
   String name = user.getDisplayName();
   String email = user.getEmail();
   Uri photoUrl = user.getPhotoUrl();

   // The user's ID, unique to the Firebase project. Do NOT use this value to
   // authenticate with your backend server, if you have one. Use
   // FirebaseUser.getToken() instead.
   String uid = user.getUid();
}

save the link
use share preference first,later use~
need to use real time data base

login one time is ok
when finish the firest time login,use the SharedPreference to save the emaill abd password.
And use SharedPreference  to save that that is already login success

Can not goback to the login page

intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);

Logout
download the picture

set the profile picture default image