I have an Android application that provides image upload functionality. When a user selects a photo the app initializes a php script on a remote server - while the image is uploading there is a progress dialog giving feedback to the user. The upload script is performed in an AsyncTask.
Currently the php processing script pseudoprocess is:
do some house keeping
upload image
image modifications (thumbnails, rotate)
send out push notifications
exit
Upon exit, the UI is freed up and the user has access to the uploaded image.
My question is in my script can/should I be doing the image modifications and push notifications outside this script? And if so how? In the Android Java I would start a background task, but is there someway to do this in PHP - and I don't mean by calling another script separately or cron jobbing something.
I mean something like:
do some housekeeping
upload image
php call background task for modifications
php call background task for push
exit
So in that example the user interface would be finished processing, but the server may still be doing some stuff on the image.