# Camera stream access

**URL:** https://forum.magicleap.cloud/t/camera-stream-access/3923
**Category:** Native Development
**Tags:** camera
**Created:** [August 7, 2024, 4:02pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923 "2024-08-07T16:02:26Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![liza](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@liza](https://forum.magicleap.cloud/u/liza)
#### Post date: [August 7, 2024, 4:02pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/1 "2024-08-07T16:02:26Z")

</div>

We're developing a new kind of infrastructure SW for AR glasses (not an app). To do that we need the following:

1. the ability to access the camera stream
2. the ratio between the camera and the screen (=a number)
3. the ability to render pixels on the entire FOV

can you help with this pls? not having this information/access will make it impossible to continue developing on the Magic Leap.

**ML2 OS version** : 1.7.0  
**MLSDK version** : 1.7.0  
**Host OS** : Windows

---

<div class="post-metadata">

### Author: ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)
#### Post date: [August 7, 2024, 4:20pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/2 "2024-08-07T16:20:35Z")

</div>

Can you provide information on the steps you tried to take ? Are you running into any specific issues?

---

<div class="post-metadata">

### Author: ![liza](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@liza](https://forum.magicleap.cloud/u/liza)
#### Post date: [August 7, 2024, 5:11pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/3 "2024-08-07T17:11:58Z")

</div>

Sure, we run an Android APK that gets the camera stream. The problem is that the output of the tracking features is limited to a fixed screen in space, we would like to overlay the feature point we extrapolate from the camera on the entire screen FOV.

---

<div class="post-metadata">

### Author: ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)
#### Post date: [August 7, 2024, 5:16pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/4 "2024-08-07T17:16:58Z")

</div>

This is because the APK you are running is a 2D app. For an application to render as a full screen spatial app, you will need to build an OpenXR App that has Magic Leap 2 support:

> **[Getting Started - Native OpenXR | MagicLeap Developer Documentation](https://developer-docs.magicleap.cloud/docs/guides/openxr/getting-started/getting-started-openxr/)**
>
> This category includes information on getting started with Native OpenXR App Development for Magic Leap 2.

---

<div class="post-metadata">

### Author: ![liza](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@liza](https://forum.magicleap.cloud/u/liza)
#### Post date: [August 7, 2024, 5:29pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/5 "2024-08-07T17:29:23Z")

</div>

Thank you so much for the quick replies, we'll try that. Will OpenXR let us run our own tracker?  
Also, I'll connect the eng. who is working on this directly to this thread so he can provide more info.

---

<div class="post-metadata">

### Author: ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)
#### Post date: [August 8, 2024, 6:11am UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/6 "2024-08-08T06:11:43Z")

</div>

Feel free to add them to this post so we can get more information.

What do you mean when you say “own tracker”?

---

<div class="post-metadata">

### Author: ![liza](https://avatars.discourse-cdn.com/v4/letter/l/a88e4f/32.png) [@liza](https://forum.magicleap.cloud/u/liza)
#### Post date: [August 13, 2024, 8:45am UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/7 "2024-08-13T08:45:08Z")

</div>

Apologies for the delay.  
I think my colleague can provide a much better answer, so I'll wait for him to tune in to the conversation. And again - thank you so so much for your quick help, it's much appreciated!

---

<div class="post-metadata">

### Author: ![guy](https://avatars.discourse-cdn.com/v4/letter/g/9e8a1a/32.png) [@guy](https://forum.magicleap.cloud/u/guy)
#### Post date: [August 15, 2024, 4:03pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/8 "2024-08-15T16:03:15Z")

</div>

Hi! My name is Guy and I work with Liza.  
I will try to clarify the question:  
We would like to use your device HW without the supplied XR packages.  
Is it possible to write an Android application that will use and communicates directly with the Android OS and with the device sensors (via Android API ofcourse)

---

<div class="post-metadata">

### Author: ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)
#### Post date: [August 15, 2024, 4:05pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/9 "2024-08-15T16:05:06Z")

</div>

You can access some of the sensors using the Standard Android APIs such as the Camera2 NDK API to access the RGB camera and the Android Sensor Manager to access sensors such as the IMU. However, you will not be able to access the depth or world cameras nor change the way that the 2D Android app displays without creating an OpenXR application.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)
#### Post date: [August 30, 2024, 4:06pm UTC](https://forum.magicleap.cloud/t/camera-stream-access/3923/10 "2024-08-30T16:06:03Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
