0

I have trouble with my project. I want make a Login Session with Navigation Drawer (Like Play Store) with mysql.

I want to put username and email to "navigation_header", but always failed. I use SharePreference with volley to manage this session Login.

When i put this session to other activity, Login success. I put session to TextView, and logout to Button with LinearLayout.

Can you help me to my trouble, or are there website to help this trouble?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

2 Answers2

0

for doing your issue you have to write independent api that must written with server side language like php, asp or etc. then you have to wirte session management system with shared preferences and then write your logic in your app

  • Thanks for your comment :) I haven't trouble for mysql + api(php). It is worked. [![This is my Navigation Drawer][1]][1] [1]: https://i.stack.imgur.com/y78HQ.jpg I put "username, email" json session from login to MainActivity (Navigation_header). I try to change : "Android Studio = username" , "android..@android = email", " sign out = button logout intent to login form". But always failed, my apps always force closed. When i put to activity_main with linearLayout : "TextView and Button ". It's worked, but my app interface is bad. You can look like 'Play Store'. Any solution again? – Chandra Bagas Jun 18 '18 at 11:03
0

in this case you may have two problem

  1. in all android networking codes you must write your codes in asynctask. if you are using volley you dont need this.

2.your layout have problem

for doing twice above you have to see log and you must be a cool debuger if you have problem yet , copy your error in log here to exactly help you.