Localize the title of the configuration activity.
Auto open local settings (e.g. clay)
This commit is contained in:
parent
1aadcb958b
commit
1933e2bf10
|
@ -261,7 +261,7 @@
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.ExternalPebbleJSActivity"
|
android:name=".activities.ExternalPebbleJSActivity"
|
||||||
android:label="external_js"
|
android:label="@string/app_configure"
|
||||||
android:parentActivityName=".activities.AppManagerActivity">
|
android:parentActivityName=".activities.AppManagerActivity">
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<div id="step1">
|
<div id="step1">
|
||||||
<h2>Url of the configuration:</h2>
|
<h2>Url of the configuration:</h2>
|
||||||
<div id="config_url"></div>
|
<div id="config_url"></div>
|
||||||
<button class="btn" name="show config" value="show config" onclick="Pebble.showConfiguration()" >Show config / URL</button>
|
<!--<button class="btn" name="show config" value="show config" onclick="Pebble.showConfiguration()" >Show config / URL</button>-->
|
||||||
<button class="btn" name="open config" value="open config" onclick="Pebble.actuallyOpenURL()" >Open configuration website</button>
|
<button class="btn" name="open config" value="open config" onclick="Pebble.actuallyOpenURL()" >Open configuration website</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="step2">
|
<div id="step2">
|
||||||
|
|
|
@ -111,6 +111,8 @@ function gbPebble() {
|
||||||
GBjs.gbLog("app wanted to show: " + title + " body: "+ body);
|
GBjs.gbLog("app wanted to show: " + title + " body: "+ body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.ready = function() {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,6 +131,7 @@ if (jsConfigFile != null) {
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('step2').style.display="none";
|
document.getElementById('step2').style.display="none";
|
||||||
Pebble.ready();
|
Pebble.ready();
|
||||||
|
Pebble.showConfiguration();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,9 +96,13 @@ public class ExternalPebbleJSActivity extends Activity {
|
||||||
private class GBChromeClient extends WebChromeClient {
|
private class GBChromeClient extends WebChromeClient {
|
||||||
@Override
|
@Override
|
||||||
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
|
||||||
|
if (ConsoleMessage.MessageLevel.ERROR.equals(consoleMessage.messageLevel())) {
|
||||||
GB.toast(consoleMessage.message(), Toast.LENGTH_LONG, GB.ERROR);
|
GB.toast(consoleMessage.message(), Toast.LENGTH_LONG, GB.ERROR);
|
||||||
|
//TODO: show error page
|
||||||
|
}
|
||||||
return super.onConsoleMessage(consoleMessage);
|
return super.onConsoleMessage(consoleMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class GBWebClient extends WebViewClient {
|
private class GBWebClient extends WebViewClient {
|
||||||
|
|
Loading…
Reference in New Issue