What have I done wrong this code should let me pick an image it does that but then takes me to Smart Launcher 5 (my…

What have I done wrong this code should let me pick an image it does that but then takes me to Smart Launcher 5 (my backup launcher) :/

function pickImage(){

var intent = new Intent();

intent.setAction(Intent.ACTION_PICK);

intent.setType(“image/*”);

mctx.startActivityForResult(Intent.createChooser(intent, “Choose Image for ActionBar up navigation icon”), 0);

};

// THE CODE BELOW TAKES ME TO ANOTHER LAUNCHER :/

onActivityResult:function(request, result, data){

super.onActivityResult(request, result, data);

if(request == 0 && result == RESULT_OK){

Android.makeNewToast(“done”, true).show;

}

}

]]>

2 Commentsto What have I done wrong this code should let me pick an image it does that but then takes me to Smart Launcher 5 (my…

  1. Anonymous says:

    < ![CDATA[

    I did not know it was possible to overload java functions, like onActivityResult

    ]]>

  2. Anonymous says:

    < ![CDATA[

    ah maybe its not, after looking at the lightning api I see this so looks like I have to handle the result from another script.https://lh3.googleusercontent.com/xBPoDAncyMTl5-xEZ6KdTt7FV9PZjEfwBsSnqqFiXUimil8-wBLCfZrpTZamf3bsqF6i5-mv1Q

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *