|
|
@@ -3,20 +3,15 @@ package com.usai.redant.apexdrivers;
|
|
|
|
|
|
import android.Manifest;
|
|
|
import android.app.AlertDialog;
|
|
|
-import android.app.NotificationManager;
|
|
|
import android.app.ProgressDialog;
|
|
|
-import android.content.ComponentName;
|
|
|
import android.content.Context;
|
|
|
import android.content.DialogInterface;
|
|
|
import android.content.Intent;
|
|
|
-import android.content.ServiceConnection;
|
|
|
import android.content.pm.PackageManager;
|
|
|
import android.graphics.drawable.Drawable;
|
|
|
-import android.location.Location;
|
|
|
import android.net.Uri;
|
|
|
import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
-import android.os.IBinder;
|
|
|
import android.os.PowerManager;
|
|
|
import android.provider.Settings;
|
|
|
import android.support.v4.app.ActivityCompat;
|
|
|
@@ -25,7 +20,6 @@ import android.support.v4.app.FragmentManager;
|
|
|
import android.support.v4.app.FragmentTransaction;
|
|
|
import android.support.v4.app.NotificationManagerCompat;
|
|
|
import android.text.TextUtils;
|
|
|
-import android.util.Log;
|
|
|
import android.view.Menu;
|
|
|
import android.view.MenuItem;
|
|
|
import android.widget.RelativeLayout;
|
|
|
@@ -45,6 +39,8 @@ import org.json.JSONObject;
|
|
|
|
|
|
import java.lang.ref.WeakReference;
|
|
|
|
|
|
+//import android.location.Location;
|
|
|
+
|
|
|
|
|
|
public class MainActivity extends BasicActivity implements LoginFragment.LoginCallBack {
|
|
|
|
|
|
@@ -76,64 +72,64 @@ public class MainActivity extends BasicActivity implements LoginFragment.LoginCa
|
|
|
RAUtil.LibTest1();
|
|
|
|
|
|
|
|
|
- if(true)
|
|
|
- return;
|
|
|
-
|
|
|
-// String en1=AESUtil.encrypt256("usai1234usai1234usai1234usai1234","ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ--ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ");
|
|
|
-// String de1=AESUtil.decrypt256("usai1234usai1234usai1234usai1234",en1);
|
|
|
-// Log.d("AES256", "EN: "+en1+" DE: "+de1);
|
|
|
-
|
|
|
-// String en2=AESUtil.encrypt256("usai1234","ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ--ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ");
|
|
|
-// String de2=AESUtil.decrypt256("usai1234",en2);
|
|
|
-// Log.d("AES256", "EN: "+en2+" DE: "+de2);
|
|
|
+// if(true)
|
|
|
+// return;
|
|
|
//
|
|
|
+//// String en1=AESUtil.encrypt256("usai1234usai1234usai1234usai1234","ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ--ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ");
|
|
|
+//// String de1=AESUtil.decrypt256("usai1234usai1234usai1234usai1234",en1);
|
|
|
+//// Log.d("AES256", "EN: "+en1+" DE: "+de1);
|
|
|
+//
|
|
|
+//// String en2=AESUtil.encrypt256("usai1234","ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ--ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ");
|
|
|
+//// String de2=AESUtil.decrypt256("usai1234",en2);
|
|
|
+//// Log.d("AES256", "EN: "+en2+" DE: "+de2);
|
|
|
+////
|
|
|
+////
|
|
|
+//// String en3=AESUtil.encrypt256("usai1234","ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ--ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ");
|
|
|
+//// String de3=AESUtil.decrypt256("usai1234",en3);
|
|
|
+//// Log.d("AES256", "EN: "+en3+" DE: "+de3);
|
|
|
//
|
|
|
-// String en3=AESUtil.encrypt256("usai1234","ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ--ABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZABCDE$3&))@!_*FGHIJ^%KLMNOPQRSTUVWXYZ");
|
|
|
-// String de3=AESUtil.decrypt256("usai1234",en3);
|
|
|
-// Log.d("AES256", "EN: "+en3+" DE: "+de3);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if(true)
|
|
|
- return;
|
|
|
- ServiceConnection serviceConnection= new ServiceConnection(){
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
|
|
- ApexDriversBackgroundService.MyBinder binder;
|
|
|
- binder = (ApexDriversBackgroundService.MyBinder)iBinder;
|
|
|
- ApexDriversBackgroundService service = (ApexDriversBackgroundService)binder.getService();
|
|
|
-
|
|
|
- Location l=service.RequestCachedLocation();
|
|
|
- if(l!=null)
|
|
|
- Log.d("", "RequestLocation: "+l.toString());
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onServiceDisconnected(ComponentName componentName) {
|
|
|
-
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
- Intent intent = new Intent(MainActivity.this, ApexDriversBackgroundService.class);
|
|
|
-
|
|
|
- bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
- int FLAG_LOCATION_NONE = 0 ;
|
|
|
|
|
|
- int FLAG_LOCATION_SERVICE = 1 << 1;
|
|
|
- int FLAG_NOTIFICATION_SERVICE = 1 << 2;
|
|
|
- int FLAG_UPLOAD_SERVICE = 1 << 3;
|
|
|
|
|
|
- int a = 0;
|
|
|
+// if(true)
|
|
|
+// return;
|
|
|
+// ServiceConnection serviceConnection= new ServiceConnection(){
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
|
|
+// ApexDriversBackgroundService.MyBinder binder;
|
|
|
+// binder = (ApexDriversBackgroundService.MyBinder)iBinder;
|
|
|
+// ApexDriversBackgroundService service = (ApexDriversBackgroundService)binder.getService();
|
|
|
+//
|
|
|
+// Location l=service.RequestCachedLocation();
|
|
|
+// if(l!=null)
|
|
|
+// Log.d("", "RequestLocation: "+l.toString());
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onServiceDisconnected(ComponentName componentName) {
|
|
|
+//
|
|
|
+// }
|
|
|
+// };
|
|
|
+//
|
|
|
+// Intent intent = new Intent(MainActivity.this, ApexDriversBackgroundService.class);
|
|
|
+//
|
|
|
+// bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+// int FLAG_LOCATION_NONE = 0 ;
|
|
|
+//
|
|
|
+// int FLAG_LOCATION_SERVICE = 1 << 1;
|
|
|
+// int FLAG_NOTIFICATION_SERVICE = 1 << 2;
|
|
|
+// int FLAG_UPLOAD_SERVICE = 1 << 3;
|
|
|
+//
|
|
|
+// int a = 0;
|
|
|
}
|
|
|
|
|
|
@Override
|