Tidied up menus and button labels - call this version 4.0.0a - very alpha but it does most of what it needs to :)
This commit is contained in:
@@ -50,6 +50,8 @@ public class AuthenticateActivity extends AppCompatActivity {
|
||||
logoutBtn.setOnClickListener(onLogout);
|
||||
Button registerBtn = (Button) findViewById(R.id.RegisterBtn);
|
||||
registerBtn.setOnClickListener(onRegister);
|
||||
Button resetPasswordBtn = (Button) findViewById(R.id.ResetPasswordBtn);
|
||||
resetPasswordBtn.setOnClickListener(onResetPassword);
|
||||
|
||||
mUnameEt = (EditText) findViewById(R.id.username);
|
||||
mPasswdEt = (EditText) findViewById(R.id.password);
|
||||
@@ -178,6 +180,23 @@ public class AuthenticateActivity extends AppCompatActivity {
|
||||
}
|
||||
};
|
||||
|
||||
View.OnClickListener onResetPassword =
|
||||
new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Log.d(TAG, "onResetPasswordBtn");
|
||||
//Intent i;
|
||||
//i = new Intent(getApplicationContext(), RemoteDbActivity.class);
|
||||
//i.putExtra("url", "https://osdapi.ddns.net/static/register.html");
|
||||
//startActivity(i);
|
||||
String url = "https://osdapi.ddns.net/static/request_password_reset.html";
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
startActivity(i);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private void saveAuthToken(String tokenStr) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
|
||||
prefs.edit().putString(TOKEN_ID, tokenStr).commit();
|
||||
|
||||
@@ -270,13 +270,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
mConnection.mSdServer.sendSMSAlarm();
|
||||
}
|
||||
return true;
|
||||
case R.id.action_test_phone_alarm:
|
||||
|
||||
/*case R.id.action_test_phone_alarm:
|
||||
Log.i(TAG, "action_test_phone_alarm");
|
||||
if (mConnection.mBound) {
|
||||
mConnection.mSdServer.sendPhoneAlarm();
|
||||
}
|
||||
return true;
|
||||
case R.id.action_authenticate_api:
|
||||
*/
|
||||
|
||||
/* case R.id.action_authenticate_api:
|
||||
Log.i(TAG, "action_autheticate_api");
|
||||
try {
|
||||
Intent i = new Intent(
|
||||
@@ -287,6 +290,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
Log.i(TAG, "exception starting export activity " + ex.toString());
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
/*
|
||||
case R.id.action_export:
|
||||
Log.i(TAG, "action_export");
|
||||
try {
|
||||
@@ -298,6 +303,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
Log.i(TAG, "exception starting export activity " + ex.toString());
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
case R.id.action_logs:
|
||||
Log.i(TAG, "action_logs");
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user