Start a new topic

カメラ権限の取得方法について

現在Unityで開発中のプロジェクトにてSpacesSDK 0.14.0を使用しておりカメラ
映像を使用するシーンに移行する前にカメラの権限を要求するようにしていますが、初回起動時に限り権限を許可した
場合それでもARグラスのカメラ映像が取得できず、途中表示されてしまう不具合が発生しております

初回起動前にアプリ情報の権限画面から手動でアプリにカメラの権限を付与するあるいは初回起動時に権限取得後にアプリを再起動することでカメラ映像は表示されるようになりますがアプリから
呼び出さ
れる権限要求でも初回起動時にカメラ映像が表示されるよう修正したいと考えております

SpacesSDKを使用してARグラスのカメラ映像を使用するにあたって、カメラ権限取得の際の注意点と、参考としてサンプルアプリのような権限要求処理の実装方法を教えていただけますと幸いですよろしくお願いいたし
ます


Hi, I translated your question and hope that that will suffice for communication. 

The Snapdragon Spaces SDK should automatically request camera permissions before starting an app. You do not need to implement that yourself. 


A couple questions:

  • Is there a reason you are using the 0.14.0 SDK?
  • What device are you using?
  • What is the version of the Snapdragon Spaces Services on that device?


Camera Frame Access in 0.14.0 was rather new and not available for all devices. If you are using VRX, the device is not on the allowlist for Camera Frame Access in this version of the SDK.

Camera Frame Access has changed and improved a lot since the 0.14.0 release, and I would recommend upgrading to the 0.21.0 SDK or the 0.19.1.1 SDK.


In Unity you can access the Snapdragon Spaces samples via the Package Manager https://docs.spaces.qualcomm.com/unity/setup/SetupGuideUnity.html#import-the-samples 

Here is a more detailed guide on the feature: Camera Frame Access Sample (qualcomm.com)  


Please provide some more details, screenshots, or videos if possible. 

ご回答ありがとうございます

SpacesSDKを利用していると、アプリを起動する前に自動的にカメラへのアクセス権限が要求されるため

別途権限要求処理を実装する必要はないとのことでしたが

これは、サンプルアプリ起動時の下記ダイアログが表示される挙動を指しているのでしょうか?

Permissions Request

This application requires permissions granted to function properly.

Do you want to request permissions?

開発中のアプリ側で実装している権限要求をコメントアウトしましたが、アプリ起動前にカメラへのアクセス権限が要求されるという挙動は確認できませんでした

以下は頂いた質問の回答となります

・Is there a reason you are using the 0.14.0 SDK?

→バージョン1.0.0がリリースされるまでは必要性がある場合にのみバージョンの更新を行っており、0.14.0を利用する明確な理由はありません

・What device are you using?

→「motorola edge 30 Pro」と「ThinkReality A3」を使用しております


・What is the version of the Snapdragon Spaces Services on that device?

→0.14.0を使用しております

 

 

 

 

 

 

When the android permission dialogue pops up you need to confirm the permissions. Please check if the Snapdragon Spaces Services and your own application do have all permissions (Camera, Display over other apps) granted. Don't uncomment the code requesting the permission in the SDK plugin. The camera access permission is necessary for camera frame access and other perception features to work. 


Could you please look up the firmware versions installed on your Motorola Edge device and A3? It should at least be Android 13.

You can find the firmware of your glasses in TR Hub in the About section. 

You can find the latest firmware versions at https://support.spaces.qualcomm.com/a/solutions/articles/72000604962



Generally I would recommend updating your Motorola Edge phone to the newly released 0.21.0 Snapdragon Spaces Services following this guide: https://support.spaces.qualcomm.com/a/solutions/articles/72000604859

Compatibility between 0.14.0 plugin and 0.21.0 services should be possible, but I would advise to update your project to 0.21.0 as well. 




ご回答ありがとうございます

コメントアウトを行ったのはアプリ側の自身で実装していた権限要求処理のみで

SDK側の処理はコメントアウトはしておりません


また、権限が付与されたのちにアプリを再起動することでカメラ映像は取得できており

カメラ映像が取得できない不具合が発生するのは、アプリの初回起動時のみとなっております

その際、Snapdragon Spaces Servicesにはすべての権限が付与されていることも確認しております


以下、質問に対しての回答となります


motorola edge 30 Pro

→Android 13


ThinkReality A3

→A3_user_S1127001_2303071610_sdm710_postcs8

 

 

 

 

 

In a later version of Snapdragon Spaces, we moved the camera permission dialogue before the launch of the unity activity to address this issue. It should be fixed by upgrading the Snapdragon Spaces SDK of your project and updating the Snapdragon Spaces services. 


Thanks for the info on your firmware. It seems up to date and is not causing the issue.


Please let me know if that works for you. 

Login or Signup to post a comment