HalfdanJ / ofxARCore

Experimental addon for openFrameworks to use ARCore on Android devices
Apache License 2.0
182 stars 29 forks source link

ofxAndroidCheckPermission(CAMERA) and ofxAndroidRequestPermission(CAMERA) #10

Open tomschofield opened 6 years ago

tomschofield commented 6 years ago

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 commented 6 years ago

Ah i think the function name was changed in openframeworks after I made the add-on. I'll take a look at it in a couple of days unless you have already found the function.

On Thu, Dec 21, 2017, 14:27 Tom Schofield notifications@github.com wrote:

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

I've installed and built oF using Irene Alvarado's excellent guide https://medium.com/@ire_alva/getting-started-with-openframeworks-on-android-5202b92f6582 and using your openframeworks repo https://github.com/HalfdanJ/openFrameworks/tree/android-camera-permissions/addons. 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'

Looking through the library I don't see where the functions above are declared. They aren't in ofxArCore header and they don't seem to be anywhere in the ofxAndroid addon either. Were these present in an earlier version? What's missing? Any clues would be gratefully received.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HalfdanJ/ofxARCore/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AAN4yVRaXg_khy2W2v8pdzaOZ7L1nyW2ks5tClzUgaJpZM4RJ0iq .

tomschofield commented 6 years ago

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 commented 6 years ago

Could you make a pull request with the change?

On Tue, Dec 26, 2017, 21:34 Tom Schofield notifications@github.com wrote:

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.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HalfdanJ/ofxARCore/issues/10#issuecomment-354010434, or mute the thread https://github.com/notifications/unsubscribe-auth/AAN4ycxhpG5aBd5JBOBR0bOdm0-6tf4zks5tEVg9gaJpZM4RJ0iq .

tomschofield commented 6 years ago

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).