我製作了一個訪問相機的android AARplugins。 但它不會激活onActivityResult
。[Unity 3D]我想要訪問Android相機並拿起路徑
public static void showCamera () // Connect Camera
{
String Uri;
Activity CameraActivity = UnityPlayer.currentActivity;
Toast.makeText(CameraActivity , "first" ,Toast.LENGTH_LONG).show();
Log.d(" before [email protected]@@@@@ ", "first");
CameraActivity.runOnUiThread(new Runnable()
{
public void run() {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
CameraActivity.startActivityForResult(intent,1);
}
});
}
///////////////不要↓激活/////////////////////// ///////////
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
Log.d(" before [email protected]@@@@@ ", "twotwotwotwotwotwotwo"); //Don't activate
}
//////////////////////////////// ////////////////////////////////////////////
why why不激活這個?
接入攝像頭成功。但'dose't主動'onActivityResult()'功能 – user7578245