How to call from your application:
Intent intent = new Intent("com.vistechprojects.faceshapemeterpro.action.MEASURE_FACE"); intent.setDataAndType(IMAGE_SOURCE_URI, "image/*"); // comment this line if you don't pass image uri startActivityForResult(intent, REQUEST_CODE); // replace REQUEST_CODE with your constant
Example how to get results:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { ...
if (resultCode == RESULT_OK && requestCode == REQUEST_CODE){
JSONObject json = new JSONObject(data.getStringExtra("FSM_OUTPUT_JSON"));
...
}
... }
JSON returned from Face Shape Meter:
{"APP_RESULTS":{"face shape":"Heart"}}
No comments:
Post a Comment