Browse Source

gradle update; fix null pointer; added volley init

develop
Robin Thoni 8 years ago
parent
commit
e573116b42

+ 4
- 0
app/src/main/java/com/rthoni/camotion/ui/AddAccountActivity.java View File

12
 import android.widget.EditText;
12
 import android.widget.EditText;
13
 import android.widget.Toast;
13
 import android.widget.Toast;
14
 
14
 
15
+import com.crashlytics.android.Crashlytics;
15
 import com.luticate.auth.dbo.LuLoginDbo;
16
 import com.luticate.auth.dbo.LuLoginDbo;
16
 import com.luticate.utils.business.LuPromise;
17
 import com.luticate.utils.business.LuPromise;
17
 import com.luticate.utils.business.LuRequest;
18
 import com.luticate.utils.business.LuRequest;
21
 
22
 
22
 import org.json.JSONObject;
23
 import org.json.JSONObject;
23
 
24
 
25
+import io.fabric.sdk.android.Fabric;
26
+
24
 public class AddAccountActivity extends AppCompatActivity {
27
 public class AddAccountActivity extends AppCompatActivity {
25
 
28
 
26
     private EditText _nameInput;
29
     private EditText _nameInput;
34
     @Override
37
     @Override
35
     protected void onCreate(Bundle savedInstanceState) {
38
     protected void onCreate(Bundle savedInstanceState) {
36
         super.onCreate(savedInstanceState);
39
         super.onCreate(savedInstanceState);
40
+        Fabric.with(this, new Crashlytics());
37
         LuRequest.init(this);
41
         LuRequest.init(this);
38
         setContentView(R.layout.activity_add_account);
42
         setContentView(R.layout.activity_add_account);
39
         _nameInput = (EditText) findViewById(R.id.name_input);
43
         _nameInput = (EditText) findViewById(R.id.name_input);

+ 4
- 0
app/src/main/java/com/rthoni/camotion/ui/AddCommandShortcutActivity.java View File

5
 import android.os.Bundle;
5
 import android.os.Bundle;
6
 import android.widget.Toast;
6
 import android.widget.Toast;
7
 
7
 
8
+import com.crashlytics.android.Crashlytics;
8
 import com.luticate.auth.dbo.LuFullLoginDbo;
9
 import com.luticate.auth.dbo.LuFullLoginDbo;
9
 import com.luticate.utils.business.LuPromise;
10
 import com.luticate.utils.business.LuPromise;
10
 import com.luticate.utils.business.LuRequest;
11
 import com.luticate.utils.business.LuRequest;
15
 import com.rthoni.camotion.ui.dialogs.LoginDialog;
16
 import com.rthoni.camotion.ui.dialogs.LoginDialog;
16
 import com.rthoni.camotion.ui.fragments.AbstractCommandsFragment;
17
 import com.rthoni.camotion.ui.fragments.AbstractCommandsFragment;
17
 
18
 
19
+import io.fabric.sdk.android.Fabric;
20
+
18
 public class AddCommandShortcutActivity extends Activity {
21
 public class AddCommandShortcutActivity extends Activity {
19
 
22
 
20
     @Override
23
     @Override
21
     protected void onCreate(Bundle savedInstanceState) {
24
     protected void onCreate(Bundle savedInstanceState) {
22
         super.onCreate(savedInstanceState);
25
         super.onCreate(savedInstanceState);
26
+        Fabric.with(this, new Crashlytics());
23
         LuRequest.init(this);
27
         LuRequest.init(this);
24
         setContentView(R.layout.content_main);
28
         setContentView(R.layout.content_main);
25
         selectLocation();
29
         selectLocation();

+ 6
- 0
app/src/main/java/com/rthoni/camotion/ui/CommandExecActivity.java View File

6
 import android.support.v7.app.AlertDialog;
6
 import android.support.v7.app.AlertDialog;
7
 import android.widget.Toast;
7
 import android.widget.Toast;
8
 
8
 
9
+import com.crashlytics.android.Crashlytics;
9
 import com.luticate.auth.dbo.LuLoginDbo;
10
 import com.luticate.auth.dbo.LuLoginDbo;
10
 import com.luticate.utils.business.LuPromise;
11
 import com.luticate.utils.business.LuPromise;
12
+import com.luticate.utils.business.LuRequest;
11
 import com.rthoni.camotion.R;
13
 import com.rthoni.camotion.R;
12
 import com.rthoni.camotion.business.CamotionBusiness;
14
 import com.rthoni.camotion.business.CamotionBusiness;
13
 import com.rthoni.camotion.dbo.CommandDbo;
15
 import com.rthoni.camotion.dbo.CommandDbo;
19
 
21
 
20
 import java.util.List;
22
 import java.util.List;
21
 
23
 
24
+import io.fabric.sdk.android.Fabric;
25
+
22
 public class CommandExecActivity extends Activity {
26
 public class CommandExecActivity extends Activity {
23
 
27
 
24
     @Override
28
     @Override
25
     protected void onCreate(Bundle savedInstanceState) {
29
     protected void onCreate(Bundle savedInstanceState) {
26
         super.onCreate(savedInstanceState);
30
         super.onCreate(savedInstanceState);
31
+        Fabric.with(this, new Crashlytics());
32
+        LuRequest.init(this);
27
         setContentView(R.layout.activity_command_exec);
33
         setContentView(R.layout.activity_command_exec);
28
 
34
 
29
         CommandDbo command = new CommandDbo();
35
         CommandDbo command = new CommandDbo();

+ 5
- 0
app/src/main/java/com/rthoni/camotion/ui/MainActivity.java View File

170
 
170
 
171
     private void showView(int view)
171
     private void showView(int view)
172
     {
172
     {
173
+        if (_fullLoginDbo == null || _currentLocation == null)
174
+        {
175
+            init();
176
+            return;
177
+        }
173
         CamotionFragment fragment;
178
         CamotionFragment fragment;
174
         if (view == R.id.nav_cameras) {
179
         if (view == R.id.nav_cameras) {
175
             fragment = new CamerasFragment();
180
             fragment = new CamerasFragment();

+ 1
- 1
app/src/main/res/values/strings.xml View File

27
     <string name="error_domain">Domain is required</string>
27
     <string name="error_domain">Domain is required</string>
28
 
28
 
29
     <string name="loading">Loading…</string>
29
     <string name="loading">Loading…</string>
30
-    <string name="login_progress">Logging in…</string>
30
+    <string name="login_progress">Login in progress…</string>
31
 
31
 
32
     <string name="command_confirm">Do you really want to execute \'%1$s\' ?</string>
32
     <string name="command_confirm">Do you really want to execute \'%1$s\' ?</string>
33
     <string name="command_loading">Executing \'%1$s\'&#8230;</string>
33
     <string name="command_loading">Executing \'%1$s\'&#8230;</string>

+ 2
- 2
gradle/wrapper/gradle-wrapper.properties View File

1
-#Wed Oct 21 11:34:03 PDT 2015
1
+#Sat Apr 16 15:29:43 CEST 2016
2
 distributionBase=GRADLE_USER_HOME
2
 distributionBase=GRADLE_USER_HOME
3
 distributionPath=wrapper/dists
3
 distributionPath=wrapper/dists
4
 zipStoreBase=GRADLE_USER_HOME
4
 zipStoreBase=GRADLE_USER_HOME
5
 zipStorePath=wrapper/dists
5
 zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

Loading…
Cancel
Save