- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi. I'm hoping someone can help. This is my first app and it's a pretty simple one but it's taken me quite a while to get this far. It's basically a form which sends the data off to a web page and retrieves a response. It's working on the emulator and most devices (Nexus, android phones etc). But my tester with a Samsung Galaxy Tab says it crashes and won't even open. I don't have access to a Galaxy Tab so can't test it myself. This is the report from Google developer centre
java.lang.RuntimeException: Unable to start activity ComponentInfo{app.idas.referral/app.idas.referral.ipad_app_des}: android.content.res.Resources$NotFoundException: Resource ID #0x7f02000e
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
at android.app.ActivityThread.access$700(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:175)
at android.app.ActivityThread.main(ActivityThread.java:5279)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f02000e
at android.content.res.Resources.getValue(Resources.java:1883)
at android.content.res.Resources.getDrawable(Resources.java:1520)
at android.view.View.setBackgroundResource(View.java:15178)
at org.apache.cordova.CordovaActivity.getSplashLayout(CordovaActivity.java:1002)
at org.apache.cordova.CordovaActivity$5.run(CordovaActivity.java:1017)
at android.app.Activity.runOnUiThread(Activity.java:4799)
at org.apache.cordova.CordovaActivity.showSplashScreen(CordovaActivity.java:1057)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:393)
at app.idas.referral.ipad_app_des.onCreate(ipad_app_des.java:33)
at android.app.Activity.performCreate(Activity.java:5283)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
... 11 more
And here's my page code:
<head>
<link rel="stylesheet" type="text/css" href="jqm/jquery.mobile-min.css">
<link rel="stylesheet" type="text/css" href="css/index_main.less.css" class="main-less">
<link rel="stylesheet" type="text/css" href="css/overrides.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<script src="intelxdk.js"></script>
<script src="cordova.js"></script>
<script type="application/javascript" src="lib/jquery.min.js"></script>
<script type="application/javascript" src="jqm/jquery.mobile-min.js" data-ver="0"></script>
<script type="application/javascript" src="xhr.js"></script>
<script type="application/javascript" src="js/app.js"></script>
<script type="application/javascript" src="js/init-app.js"></script>
<script type="application/javascript" src="xdk/init-dev.js"></script>
<script type="text/javascript">
/* This code is used to run as soon as Intel activates */
var onDeviceReady=function(){
//hide splash screen
intel.xdk.device.hideSplashScreen();
};
document.addEventListener("intel.xdk.device.ready",onDeviceReady,false);
// PAGE INITIALIZATION HANDLER
$(document).on("pagecreate",function(){
//alert("pagecreate event fired!");
$('#error-message').text("");
});
$(document).on('click', '#submit', function() { // catch the form's submit event
//var incompleteText = "Please complete 'Your Name' and 'Your Email'";
var errorText = "Sorry - there was a problem. Please try again, ring our helpline on 03000 110 110 or complete the referral form on the website - <a href=\"https://www.idas.org.uk\">www.idas.org.uk</a>";
var completeText = "Thank you. Your referral was sent to IDAS.";
var incompleteText = "Please complete all fields marked with '*'.";
var iserror = 0;
//
var emailtext = $("#yourEmail").val();
if($('#yourFirstName').val().length <= 0 || $('#yourLastName').val().length <= 0 || $('#yourEmail').val().length <= 0 || $('#yourTel').val().length <= 0 || $('#theirFirstName').val().length <= 0 || $('#theirLastName').val().length <= 0 || $('#theirContact').val().length <= 0 || $('#reason').val().length <= 0) {
iserror = 1;
incompleteText = "Please complete all fields marked with '*'.";
} else if (emailtext.indexOf('@') === -1 || emailtext.indexOf('.') === -1) {
iserror = 1;
incompleteText = "Please check your email address.";
}
if(iserror == 0) {
$('#error-message').text("Sending ...");
//if($('#yourName').val().length > 0 && $('#yourEmail').val().length > 0){
// Send data to server through ajax call
var yourTitle = $("#yourTitle").val();
var yourFirstName = $("#yourFirstName").val();
var yourLastName = $("#yourLastName").val();
var yourTel = $("#yourTel").val();
var yourAgency = $("#yourAgency").val();
var theirFirstName = $("#theirFirstName").val();
var theirLastName = $("#theirLastName").val();
var theirContact = $("#theirContact").val();
var reason = $("#reason").val();
$.ajax({
type:'POST',
url:'https://www.website.uk/mypage.php',
data: { yourTitle: $("#yourTitle").val(), yourFirstName: $("#yourFirstName").val(), yourLastName: $("#yourLastName").val(), yourEmail: $("#yourEmail").val(), yourTel: $("#yourTel").val(), yourAgency: $("#yourAgency").val(), theirFirstName: $("#theirFirstName").val(), theirLastName: $("#theirLastName").val(), theirContact: $("#theirContact").val(), reason: $("#reason").val(), },
dataType: "html",
success: function (data) {
$('#error-message').text("");
if(data == "OK") {
//$('#yourName').val("");
$('#theirFirstName').val("");
$('#theirLastName').val("");
$('#theirContact').val("");
$('#reason').val("");
$('#error-message').text("");
activate_subpage("#completed");
//alert( completeText );
/*$('#introText').hide();
$('#yourName').hide(); */
/*$("label").each(function (i) {
$(this).hide();
});
$("input").each(function (i) {
$(this).hide();
});*/
} else if (data == "Incomplete") {
//alert( incompleteText );
$('#error-message').text(incompleteText);
} else {
//alert(errorText);
$('#error-message').html("error returned = "+data);
//$('#error-message').html(errorText);
}
},
error: function(jqXHR, textStatus, errorThrown){
//alert(errorText);
$('#error-message').html(errorText);
}
});
} else {
//alert(incompleteText);
//$("textarea[name='error-textarea']").html("test");
$('#error-message').text(incompleteText);
}
return false; // cancel original event to prevent form submitting
});
</script>
<script type="application/javascript" src="xdk/appdesigner/js/rest-of-space.js"></script>
<script type="application/javascript" src="js/index_user_scripts.js"></script>
<script type="application/javascript" src="xdk/ad/jqm_subpage.js"></script>
</head>
If anybody could help point me in the right direction I'd be very grateful.
Thanks
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you send .zip file of your project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Sent via private message.
Thanks

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page