Skip to content

Commit

Permalink
Test APK release
Browse files Browse the repository at this point in the history
  • Loading branch information
mariogrip committed Oct 29, 2014
1 parent 62edc52 commit ced8eb8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions app/src/main/java/com/mariogrip/octodroid/Activity.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.mariogrip.octodroid;

import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
Expand Down Expand Up @@ -45,6 +47,23 @@ protected void onCreate(Bundle savedInstanceState) {
get_class = new get();
Log.d("OctoPrint","test");
runner();

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Warning!");
builder.setMessage("I understand that this application is experimental and might crash. There are some functions that do not work like push notifications. Please report bugs!");
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
Activity.this.finish();
}
});

AlertDialog dialog = builder.create();
dialog.show();
}

public void runner(){
Expand All @@ -56,6 +75,7 @@ public void run() {
public void run() {
get.refreshJson(ip, "job");
get.refreshJson(ip, "printer");

if (server_status) {
ProgressBar progress = (ProgressBar) findViewById(R.id.progressBar);
progress.setProgress(get.getProgress());
Expand Down
Binary file modified app/src/main/res/drawable-hdpi/octoprint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/menu/my.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<item android:id="@+id/action_settings"
android:title="@string/action_settings"
android:orderInCategory="100"
app:showAsAction="never" />
/>
</menu>
6 changes: 3 additions & 3 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<resources>

<!-- Base application theme. -->
<!-- Base application theme.
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
Customize your theme here.
</style> -->

</resources>

0 comments on commit ced8eb8

Please sign in to comment.