$("#btn-start").bind("vclick", function(){
if(gLocalMessagePort) {
- showAlert("Already running.");
+ showAlert("Cannot start:<br>already running");
} else if(isStarting){
- showAlert("Now starting...");
+ showAlert("Cannot start:<br>service is starting");
} else {
isStarting = true;
start();
return false;
});
$("#btn-stop").bind("vclick", function(){
- if(gRemoteMessagePort) {
+ if(isStarting) {
+ showAlert("Cannot stop:<br>service is starting");
+ } else if(gRemoteMessagePort) {
sendCommand("stop");
} else {
- showAlert("Not running.");
+ showAlert("Cannot stop:<br>not running");
}
return false;
});
console.log("Launching [" + gServiceAppId + "] ...");
tizen.application.launch(gServiceAppId, onSuccess, onError);
} catch (exc) {
- showAlert("launch exc:" + exc.message);
+ console.log("Exception while launching HybridServiceApp: " + exc.message);
+ showAlert("Exception while launching HybridServiceApp:<br>" + exc.message);
}
}
function showAlert(message) {
var alertPopup = $("#alert-popup");
- alertPopup.find("#message").text(message);
+ alertPopup.find("#message").html(message);
alertPopup.popup("open", {positionTo: "window"});
}
\ No newline at end of file