{"action":"created","issue":{"url":"https://api.github.com/repos/damonkohler/android-scripting/issues/537","labels_url":"https://api.github.com/repos/damonkohler/android-scripting/issues/537/labels{/name}","comments_url":"https://api.github.com/repos/damonkohler/android-scripting/issues/537/comments","events_url":"https://api.github.com/repos/damonkohler/android-scripting/issues/537/events","html_url":"https://github.com/damonkohler/android-scripting/issues/537","id":83067433,"number":537,"title":"problem with setResultInteger ","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/damonkohler/android-scripting/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/damonkohler/android-scripting/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/damonkohler/android-scripting/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-31T11:29:05Z","updated_at":"2015-05-31T19:04:09Z","closed_at":null,"body":"```\ndevice : Samsung S GT-I9000\n\nfirmware version : 2.2\n\nthe values sent with setResultInteger in script pyhton isn't received\nin intent of onActivityResult(int requestCode, int resultCode, Intent\ndata) in my app. (data = null) \n\nMy app :\n\npublic class TestScripting extends Activity {\n    /** Called when the activity is first created. */\n    \n    static private final int RESULT = 3;\n    public static final String EXTRA_RESULT = \"SCRIPT_RESULT\";\n    \n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        Intent intent = new Intent(\"com.googlecode.android_scripting.action.LAUNCH_BACKGROUND_SCRIPT\");\n        intent.setClassName(\"com.googlecode.android_scripting\", \"com.googlecode.android_scripting.activity.ScriptingLayerServiceLauncher\");\n        intent.putExtra(\"com.googlecode.android_scripting.extra.SCRIPT_PATH\", \"/sdcard/hello_world.py\");        \n        startActivityForResult(intent, RESULT);            \n    }\n       \n\t @Override\n     protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t super.onActivityResult(requestCode, resultCode, data);\n         switch (requestCode) {\n             case RESULT:\n                 int resultIntegerScript = data.getIntExtra(EXTRA_RESULT, 0); \n            \t if(resultIntegerScript == 6)\n            \t {\n            \t\t Toast.makeText(TestScripting.this, \"END SCRIPT\", 2000);\n            \t }\n            \t return;\n         }         \n     }   \n}\n\nMy script : \n\nimport android\ndroid = android.Android()\ndroid.makeToast('Hello, Android!')\nprint 'Hello, Android!'\ndroid.setResultInteger(0, 6) \n\nlog cat :\n\n03-24 11:06:21.708: \nVERBOSE/sl4a.InterpreterConfiguration$InterpreterListener:127(25380): \nInterpreter discovered: com.googlecode.pythonforandroid\n03-24 11:06:21.708: \nVERBOSE/sl4a.InterpreterConfiguration$InterpreterListener:127(25380): Binary: \n/data/data/com.googlecode.pythonforandroid/files/python/bin/python\n03-24 11:06:21.712: \nVERBOSE/sl4a.InterpreterConfiguration$InterpreterListener:127(25380): \nInterpreter discovered: com.googlecode.pythonforandroid\n03-24 11:06:21.712: \nVERBOSE/sl4a.InterpreterConfiguration$InterpreterListener:127(25380): Binary: \n/data/data/com.googlecode.pythonforandroid/files/python/bin/python\n03-24 11:06:55.165: VERBOSE/sl4a.SimpleServer:197(25380): Bound to \n127.0.0.1:36199\n03-24 11:06:55.196: VERBOSE/sl4a.Process:115(25380): Executing \n/data/data/com.googlecode.pythonforandroid/files/python/bin/python with \narguments [/sdcard/hello_world.py] and with environment \n{ANDROID_SOCKET_zygote=10, AP_HANDSHAKE=caffc2f2-207d-4811-922f-f500bc3b3603, \nTMPDIR=/data/local/tmp, ANDROID_BOOTLOGO=1, \nEXTERNAL_STORAGE=/mnt/sdcard/external_sd, ANDROID_ASSETS=/system/app, \nPY4A_EXTRAS=/mnt/sdcard/com.googlecode.pythonforandroid/extras/, \nPATH=/sbin:/system/sbin:/system/bin:/system/xbin, ASEC_MOUNTPOINT=/mnt/asec, \nPYTHONPATH=/mnt/sdcard/com.googlecode.pythonforandroid/extras/python:/data/data/\ncom.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynload:/data/dat\na/com.googlecode.pythonforandroid/files/python/lib/python2.6, \nAP_HOST=127.0.0.1, \nTEMP=/mnt/sdcard/com.googlecode.pythonforandroid/extras/python/tmp, \nBOOTCLASSPATH=/system/framework/core.jar:/system/framework/ext.jar:/system/frame\nwork/framework.jar:/system/framework/android.policy.jar:/system/framework/servic\nes.jar, AP_PORT=36199, INTERNAL_STORAGE=/mnt/sdcard, ANDROID_DATA=/data, \nPYTHONHOME=/data/data/com.googlecode.pythonforandroid/files/python, \nLD_LIBRARY_PATH=/data/data/com.googlecode.pythonforandroid/files/python/lib, \nANDROID_ROOT=/system, ANDROID_PROPERTY_WORKSPACE=9,32768}\n03-24 11:06:56.536: VERBOSE/sl4a.SimpleServer$ConnectionThread:88(25380): \nServer thread 16 started.\n03-24 11:06:56.673: VERBOSE/sl4a.JsonRpcServer:74(25380): Received: {\"params\": \n[\"caffc2f2-207d-4811-922f-f500bc3b3603\"], \"id\": 0, \"method\": \"_authenticate\"}\n03-24 11:06:56.677: VERBOSE/sl4a.JsonRpcServer:117(25380): Sent: \n{\"error\":null,\"id\":0,\"result\":true}\n03-24 11:06:56.677: VERBOSE/sl4a.JsonRpcServer:74(25380): Received: {\"params\": \n[\"Hello, Android!\"], \"id\": 1, \"method\": \"makeToast\"}\n03-24 11:06:56.708: VERBOSE/sl4a.JsonRpcServer:117(25380): Sent: \n{\"error\":null,\"id\":1,\"result\":null}\n03-24 11:06:56.712: VERBOSE/sl4a.JsonRpcServer:74(25380): Received: {\"params\": \n[0, 6], \"id\": 2, \"method\": \"setResultInteger\"}\n03-24 11:06:56.723: VERBOSE/sl4a.JsonRpcServer:117(25380): Sent: \n{\"error\":null,\"id\":2,\"result\":null}\n03-24 11:06:56.735: VERBOSE/sl4a.SimpleServer$ConnectionThread:101(25380): \nServer thread 16 died.\n03-24 11:06:56.743: VERBOSE/sl4a.Process$1:135(25380): Process 25440 exited \nwith result code 0.\n\n```\n\nOriginal issue reported on code.google.com by `SofianeM...@gmail.com` on 24 Mar 2011 at 10:15"},"comment":{"url":"https://api.github.com/repos/damonkohler/android-scripting/issues/comments/107234100","html_url":"https://github.com/damonkohler/android-scripting/issues/537#issuecomment-107234100","issue_url":"https://api.github.com/repos/damonkohler/android-scripting/issues/537","id":107234100,"user":{"login":"damonkohler","id":191389,"avatar_url":"https://avatars.githubusercontent.com/u/191389?v=3","gravatar_id":"","url":"https://api.github.com/users/damonkohler","html_url":"https://github.com/damonkohler","followers_url":"https://api.github.com/users/damonkohler/followers","following_url":"https://api.github.com/users/damonkohler/following{/other_user}","gists_url":"https://api.github.com/users/damonkohler/gists{/gist_id}","starred_url":"https://api.github.com/users/damonkohler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damonkohler/subscriptions","organizations_url":"https://api.github.com/users/damonkohler/orgs","repos_url":"https://api.github.com/users/damonkohler/repos","events_url":"https://api.github.com/users/damonkohler/events{/privacy}","received_events_url":"https://api.github.com/users/damonkohler/received_events","type":"User","site_admin":false},"created_at":"2015-05-31T19:04:09Z","updated_at":"2015-05-31T19:04:09Z","body":"This issue was moved to damonkohler/sl4a#154"}}