CyrexEnterprise / ImageDetectionCordovaPlugin

Image detection cordova plugin
MIT License
102 stars 43 forks source link

onStart() is not exist in the parent class : CordovaPlugin #4

Closed wustnlp closed 6 years ago

wustnlp commented 7 years ago
@Override
public void onStart()
{
    super.onStart();

    Log.i(TAG, "onStart(): Activity starting");

    if(!checkCameraPermission()) {
        ActivityCompat.requestPermissions(activity,
                new String[]{Manifest.permission.CAMERA},
                REQUEST_CAMERA_PERMISSIONS);
    }

    if(save_files) {
        int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);

        if (permission != PackageManager.PERMISSION_GRANTED) {
            // We don't have permission so prompt the user
            int REQUEST_EXTERNAL_STORAGE = 1;
            ActivityCompat.requestPermissions(
                    activity,
                    PERMISSIONS_STORAGE,
                    REQUEST_EXTERNAL_STORAGE
            );
        }
    }

    thread_over = true;
    debug = false;
    called_success_detection = false;
    called_failed_detection = true;

    last_time = new Date();

    new android.os.Handler().postDelayed(
        new Runnable() {
            public void run() {
                cameraFrameLayout.setVisibility(View.VISIBLE);
                cameraFrameLayout.invalidate();
            }
        }, 2000);
}

if you edit the org.apache.cordova.....,and rebuild ,please give me the .jar ? ok

a31859 commented 7 years ago

Hmm which version of Cordova are you using? Check this example to see if you missed something.