original pixel operation and new compatibility

I combined the new lower-compatibility version of MainActivity.java with the version without the recursive function that was causing some problems.