diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1bc44712c..57b5181a2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -8,6 +8,7 @@ + + android:label="@string/title_activity_appmanager"> + + + + + + + + + + + 8192) // that should be too much + break; + + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] buffer = new byte[1024]; + int count; + while ((count = zis.read(buffer)) != -1) { + baos.write(buffer, 0, count); + } + + String jsonString = baos.toString(); + try { + JSONObject json = new JSONObject(jsonString); + String appName = json.getString("shortName"); + String appCreator = json.getString("companyName"); + String appVersion = json.getString("versionLabel"); + if (appName != null && appCreator != null && appVersion != null) { + debugTextView.setText("This is just a test, you cant install anything yet \n\n" + appName + " Version " + appVersion + " by " + appCreator + "\n"); + } + } catch (JSONException e) { + e.printStackTrace(); + break; + } + } + } + zis.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + NavUtils.navigateUpFromSameTask(this); + return true; + } + return super.onOptionsItemSelected(item); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + } +} diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/ControlCenter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/ControlCenter.java index 8f03cdd1e..aa840bf87 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/ControlCenter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/ControlCenter.java @@ -61,8 +61,7 @@ public class ControlCenter extends Activity { mGBDeviceAdapter.notifyDataSetChanged(); if (state == GBDevice.State.CONNECTED) { hintTextView.setText("tap connected device for App Mananger"); - } - else if (state == GBDevice.State.NOT_CONNECTED ) { + } else if (state == GBDevice.State.NOT_CONNECTED) { hintTextView.setText("tap a device to connect"); } break; @@ -77,7 +76,7 @@ public class ControlCenter extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_controlcenter); - hintTextView = (TextView) findViewById(R.id.hintTextView); + hintTextView = (TextView) findViewById(R.id.hintTextView); deviceListView = (ListView) findViewById(R.id.deviceListView); mGBDeviceAdapter = new GBDeviceAdapter(this, deviceList); deviceListView.setAdapter(this.mGBDeviceAdapter); diff --git a/app/src/main/res/layout/activity_appinstaller.xml b/app/src/main/res/layout/activity_appinstaller.xml new file mode 100644 index 000000000..5964e3d39 --- /dev/null +++ b/app/src/main/res/layout/activity_appinstaller.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a796cc2b2..fd3c92e3b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -14,6 +14,9 @@ App Manager Delete + + App Installer + Settings General Settings