Android - Things Raspberry Pi - Google Mobile Vision Support - camera

I'm trying to run an android app on Android Things OS.
The app uses facial detection as a first step filter for reaching facial recognition.
The recognition process is made by a third party (remote) API, so there is nothing to worry about it, but the detection is being carried out by the Google Mobile Vision API for Android. The problem I'm facing is that the app crashes every time a camera preview is about to start.
The code of the app is derived from this example: https://github.com/googlesamples/android-vision (Face tracking). So if this code runs, my app runs.
I also know that there is a known issue with the raspberry pi and the camera trying to create more than one output surface.
My questions are:
(1) Is there a way to successfully run the code in the example https://github.com/googlesamples/android-vision (Face tracking)?
(2) When is going to resolved that known issue?
Thanks in advance.
Attentive,
Gersain CastaƱeda.

The latest version of Android Things(DP6) which is with API 27, supports the new camera API Camera2 as its explained here.
Camera2 API supports more than one output surface and its runnable on Android Things.
For getting more inspirations of how doing this check this tutorial(how to use camera2) and this very useful sample(how to use Google Vision).

Related

Proximity Beacon Api project for Android is not scanning for devices

I am trying to implement Proximity Beacon Api for Android.
I downloaded the project from
https://github.com/google/beacon-platform/tree/master/samples/android
I can successfully run the project and after clicking on SCAN button in app nothing gets displayed.
I converted one of my Android device into EDDYSTONE beacon by installing app from
https://github.com/google/eddystone/tree/master/eddystone-uid.
But still did not find any luck in scanning beacons.
I also had a doubt that, where should I use clientID generated in google developer console.
Please help.
Did you try Nearby Messages API?
https://developers.google.com/nearby/messages/android/get-beacon-messages

Android Things - Front facing camera on IMX7d

I am currently developing an Android Things application on an IMX7d developer board and need to figure out how to get the default camera, which is configured as BACK, to be a FRONT facing one, with correct orientation. This application will make heavy use of the camera, for example with face recognition.
I've noticed with other android phones you can edit /etc/nvcamera.conf to do this, but the Android things OS image I have doesn't seem to have that file. Is there some other way to do this?

React Native app is recognized as a game on Samsung Note8

I wrote react native application. The application is simple, more informational, it is used by Redux, Saga, several linked npm packages. The app runs in normal mode, not full-screen. The structure of the application was built on the basis of Ignite.
The problem is that on the phone (Samsung Note8) the application is recognized as a game. E.g. while app is running there is a message "The game is running" on the lock screen. Also there are additional buttons for the gamepad or something like that. In additional, app has a paddings on the top and on the bottom when it's working on real device (Samsung Note8). This effect real exists when some games running. When app is running on another device (e.g. ZTE Blade 610) it's running as usual and without any side effects.
The main version is the cause of all is Game Tools that's existed on Samsung Note8 but others apps have no similar effects and running as expected.
Is there a possibility to make a react native app as a real app but not a game? Why Game Tools recognizes my app as a game? Or what is the reason and how can it be affected?
Thanks.
I think there are few possibilities.
you (or one of your dependencies) have included the google play service API which inside of play service API has a module named games that samsung will automatically treat it as game.
You could find which of your dependency is loading google play service API and create a exclude like:
compile (project ('your.dependency')){
exclude group: 'com.google.android.gms', module:'play-services-game'
}
Your application id (can see on build.gradle) is registered on samsung game database. You could check by going into playstore and search for your application id
this is something that can happen on samsung phones due to the package name of your app.
we cant change this after the initial release, you must contact samsung developer support and they can fix it on the fly.
i wrote a gist on github about it:
https://gist.github.com/Adnan-Bacic/718eb3b4e70380696c91dc21c4804112

Buildfire: How to use the Barcode Scanner

I have gotten to the point where I can launch the barcode mock mode.
I am trying to figure out how I can start scanning test codes in development.
Or would an app that I am trying to test this on, need to have camera permissions on the app?
In that case, how do you overcome the use of the Camera Hardware on the PWA?
Or is there a way that I can scan QR-Codes using a different javascript API that would work in all cases?
Also, I had to move the camera and barcode service Javascript files into my Widget folder because when I was trying to reference them as you do on the instructions, the files wouldn't load.
Yes when you are in web it will mock the functionality because you're not on a device. There are HTML5 Camera API's see (https://www.html5rocks.com/en/tutorials/getusermedia/intro/)
You can use the BuildFire Previewer App (contact customer support if you havent downloaded it yet)
While you can take a copy of the services into your plugin it is risky. If we issue any updates or bug fixes you will not receive them. Also if it breaks compatibility at any time (rare but possible) your plugin stop working

Are Google-Fit API available on Android TV?

My sample app using GoogleFit API of GooglePlayServices runs on Android mobile (using Android-M) but the same sample app gives error as API_UNAVAILABLE on Android TV (using Android-M) even though PlayServices version is latest version on TV.
My intention is to only to READ the Google-fit data.
Is it so that device like TV might not have health/fitness sensors and hence GooglePlayServices does not enable Google-Fit API (even though an application might be only interested in reading data)?
Any pointers available on this on how to enable GoogleFit APIs on Android TV?
EDIT1
Tried with 365 Body Workout apk https://play.google.com/store/apps/details?id=com.peirr.workout.play&hl=en on AndroidTV having latest GooglePlayServices [11.5.09 (836-164803921)] and found that it does not work as indicated in the below picture