I’m working on an android app that can call upon HP ePrint app to perform printing wirelessly. The printing function have been tested working. However, after the user press the print button, i would like my app to come to the front instead of it staying at the ePrint app, and for that I’ll need the response code from the ePrint app.
I googled that one way to do it is by calling the intent with startActivityForResult, as:
startActivityForResult(intent, REQUEST_CODE_PRINT_FILE);
however i failed to find the value for the variable REQUEST_CODE_PRINT_FILE. Do i need to know the value of the variable or i can simply use RESULT_OK in my case?
Thanx.
REQUEST_CODE_PRINT_FILE can be a any int value >= 0 , this value will be returned back to you
onActivityResult()arguments once the printer Activity destroyed.please check the docs.
http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent,%20int%29