join us on Discord for support, updates, and all things Snap AR! See you there!
Is there a way to get information out of a lens and into my app?
I am very new to iOS development, and I am having trouble understanding how (or if) to get information from the lens into my app.
It's nothing special really, I have a sequential set of lenses that I want to progress the user through and I need to tell if the user "completed" the lens. My solution right now is to make each lens a timed experience with a question at the end.
Best Answer
-
Hey @Kevando
To send data from the Lens to the app you will want to use Remote APIs.
In the Camera Kit Sample app you can look at the CatFactRemoteApiServiceProvider for an example implementation and adapt that to send a request from the Lens once the user has completed it. Your use case is most similar to the Button Press example on that docs page mentioned above.
2
Answers
-
Thanks @ForumChris ! This example inherently answers all of my follow up questions. Amazing work as always
1 -
Your approach of creating a timed experience with questions at the end for each lens sounds like a reasonable solution. To get information from the lens into your app, you might want to explore using sensors, camera data, or user interactions depending on the nature of your lenses.
Feel free to ask specific questions or share more details about your project if you need further guidance. The iOS developer community is a great resource, and you'll find plenty of support as you learn navigate through your development journey.
0