我可以制作一个相机,它会在收到任何消息后打开,并在Android手机中通过照片重放此图像。如何在不使用用户权限的情况下制作?
Intent in = new Intent(
android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(in);
答案 0 :(得分:0)
Every application when is installed shows a list of permissions,
and only can be installed if the user accepts to install, in fact for
security issues you can´t make an application that capture a photo
without user permission...
<强> Permissions 强>
请求必须按顺序授予应用程序的权限 让它正常运作。权限由用户授予 应用程序已安装,而不是在运行时。
想象一下你的问题是那个应用程序,我想不止一个想删除你的问题! :0
答案 1 :(得分:0)
您需要使用startActivityForResult
来获取返回的图片。如文档中所述。 http://developer.android.com/guide/topics/media/camera.html#intent-image用于创建意图,http://developer.android.com/guide/topics/media/camera.html#intent-receive用于获取结果。