Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

ofxAndroidCheckPermission(CAMERA) and ofxAndroidRequestPermission(CAMERA) #10

Open
tomschofield opened this issue Dec 21, 2017 · 4 comments

Comments

@tomschofield
Copy link

tomschofield commented Dec 21, 2017

Thanks for putting this addon together, I'm so close I can almost taste it.

I've installed and built oF on OSX using Irene Alvarado's excellent guide and using your openframeworks repo. After some gradle issues I've managed to build/make the project. On trying to run it to my phone however I get an error:

Error:(66, 33) error: use of undeclared identifier 'CAMERA'

and also I don't believe it recognises the ofxAndroid functions:

Error:(66, 5) error: use of undeclared identifier 'ofxAndroidRequestPermission'
Error:(68, 8) error: use of undeclared identifier 'ofxAndroidCheckPermission'

edit:These functions appear to be in the ofxAndroid addon which I assumed was included when I chose android studio as the platform in the OSX project generator. Is it possible that is isn't? The addon (ofxAndroid) doesn't appear as an option in the project generator dropdown and I assumed this was because it was included by default. If not, how do I include it?

edit2: I resolved this. The functions appear to have been deprecated and replaced with

ofxAndroidRequestCameraPermission
ofxAndroidCheckCameraPermission

respectively. Previously they took an argument (CAMERA) and don't anymore. Unfortunately the app immediately crashes after requesting permission on my pixel. I have the arcore-preview apk installed and can run the example 'stickers' app that ships with the pixel camera. Should I open a new issue about the crashing?

edit3: the crashing is due to an update in the arcore libs. The current preview apk referenced from arcore docs is version2. the previous version (Compatible) with Dan's addon is here.

@HalfdanJ
Copy link
Owner

HalfdanJ commented Dec 26, 2017 via email

@tomschofield
Copy link
Author

Very kind of you but I have indeed found in ofxAndroidUtils.h / .cpp
In your library I just swapped in the new function names in ofxARCore.cpp (for anyone else reading).
Thanks again for the addon and your offer of help.

@HalfdanJ
Copy link
Owner

HalfdanJ commented Dec 26, 2017 via email

@tomschofield
Copy link
Author

tomschofield commented Jan 11, 2018

Made the pull request (I'm not super familiar with git so hope I've got this right!). Apologies for the delay (xmas, kids usual excuses).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants