Could not detect camera device in my application

General information about Neurotechnology and its software

Could not detect camera device in my application

Postby cat110005 » Apr 09, 2017 06:27

I have written small testing application in Android.

My license is succeeded.

Use the following code to detect camera in mobile.
Code: Select all
NBiometricClient client = new NBiometricClient();

client.setUseDeviceManager(true);

client.initialize();

Log.d(TAG, "Count: " + client.getDeviceManager().getDevices().size());


I am getting "Count: 0".

But in your demo application(device-sample) its working fine..I mean it shows 3 devices.

Please tell me whether i am missing something???
cat110005
 
Posts: 2
Joined: Apr 09, 2017 06:17

Re: Could not detect camera device in my application

Postby andres_velasquez » May 19, 2017 21:29

Hi, did you have any update or support about this error?

it"s happening me too.
andres_velasquez
 
Posts: 7
Joined: May 19, 2017 21:11

Re: Could not detect camera device in my application

Postby MartynasV » May 22, 2017 11:46

andres_velasquez wrote:Hi, did you have any update or support about this error?

it"s happening me too.

Hello,

Is "SDK\Bin\Android\multibiometric-sample.apk"(VeriLook activity) able to detect your device's cameras?
If yes, then take our unmodified sample("SDK\Samples\Biometrics\Android\multibiometric-sample") and build&deploy it. If it is unable to detect cameras, check app's build apk file if it contains more than one ".dex"(e.g. classes.dex, classes2.dex) files in root directory. If there are more than one, it means that multidex feature is on and you have to turn it off: https://developer.android.com/studio/bu ... tidex.html .
If you done above and everything works, but your app still fails to detect cameras, then make sure that you set "NCore.setContext(this);" at the start of your app, as it is done in our samples:
Code: Select all
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      NCore.setContext(this);


Please provide SDK revision number(can be found in SDK root directory, in Revision.txt file).
What device you are using?
What Android version does it have?
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 397
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Could not detect camera device in my application

Postby andres_velasquez » May 22, 2017 15:13

MartynasV wrote:
andres_velasquez wrote:Hi, did you have any update or support about this error?

it"s happening me too.

Hello,

Is "SDK\Bin\Android\multibiometric-sample.apk"(VeriLook activity) able to detect your device's cameras?
If yes, then take our unmodified sample("SDK\Samples\Biometrics\Android\multibiometric-sample") and build&deploy it. If it is unable to detect cameras, check app's build apk file if it contains more than one ".dex"(e.g. classes.dex, classes2.dex) files in root directory. If there are more than one, it means that multidex feature is on and you have to turn it off: https://developer.android.com/studio/bu ... tidex.html .
If you done above and everything works, but your app still fails to detect cameras, then make sure that you set "NCore.setContext(this);" at the start of your app, as it is done in our samples:
Code: Select all
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      NCore.setContext(this);


Please provide SDK revision number(can be found in SDK root directory, in Revision.txt file).
What device you are using?
What Android version does it have?


Hi Martynas, i builded the sample and launched the app, disabling multidex feature, but doesn't work, the app crashes. But the message "SOURCE_MISSING" does not appear.

Multidex disabling doesn't work in debug enviroment.

I´m using a Moto G with android 6.0 Marshmallow and a ASUS Zenfone 2 with Marshmallow too.

Thank you by your support.
andres_velasquez
 
Posts: 7
Joined: May 19, 2017 21:11

Re: Could not detect camera device in my application

Postby andres_velasquez » May 22, 2017 15:24

This is the log when the app crashed and the multidex is disabled

05-22 10:16:28.777 30432-30490/com.neurotec.samples.multibiometric V/RenderScript: 0xb99b5158 Launching thread(s), CPUs 4
05-22 10:16:30.909 30432-30493/com.neurotec.samples.multibiometric I/art: Rejecting re-init on previously-failed class java.lang.Class<com.neurotec.devices.fscanners.nitgen.NDMNitgen$1>
05-22 10:16:30.909 30432-30493/com.neurotec.samples.multibiometric I/art: Rejecting re-init on previously-failed class java.lang.Class<com.neurotec.devices.fscanners.nitgen.NDMNitgen$1>
05-22 10:16:31.128 30432-30493/com.neurotec.samples.multibiometric I/art: Rejecting re-init on previously-failed class java.lang.Class<com.neurotec.devices.fscanners.nitgen.NDMNitgen$1>
05-22 10:16:31.145 30432-30493/com.neurotec.samples.multibiometric I/art: Rejecting re-init on previously-failed class java.lang.Class<com.neurotec.devices.fscanners.nitgen.NDMNitgen$1>
05-22 10:16:31.231 30432-30438/com.neurotec.samples.multibiometric W/art: Suspending all threads took: 19.096ms
05-22 10:16:32.297 30432-30734/com.neurotec.samples.multibiometric I/art: Thread[11,tid=30734,Native,Thread*=0xb9a3e310,peer=0x12cd2280,"Thread-1971"] recursive attempt to load library "/data/app/com.neurotec.samples.multibiometric-1/lib/arm/libusb.so"
05-22 10:16:32.317 30432-30734/com.neurotec.samples.multibiometric I/art: Thread[11,tid=30734,Native,Thread*=0xb9a3e310,peer=0x12cd2280,"Thread-1971"] recursive attempt to load library "/data/app/com.neurotec.samples.multibiometric-1/lib/arm/libibscanultimatejni.so"
05-22 10:16:32.322 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Enter IBSU_RegisterCallbacks (handle=0, events=0)
05-22 10:16:32.332 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Exit IBSU_RegisterCallbacks (handle=0, events=0, pEventName=0xa1f898a5, pContext=0xa1f898a5)
05-22 10:16:32.332 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Enter IBSU_RegisterCallbacks (handle=0, events=8)
05-22 10:16:32.332 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Exit IBSU_RegisterCallbacks (handle=0, events=8, pEventName=0xa1f89835, pContext=0xa1f89835)
05-22 10:16:32.333 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Enter IBSU_RegisterCallbacks (handle=0, events=10)
05-22 10:16:32.333 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Exit IBSU_RegisterCallbacks (handle=0, events=10, pEventName=0xa1f89911, pContext=0xa1f89911)
05-22 10:16:32.397 30432-30734/com.neurotec.samples.multibiometric V/multibiometric.dpuvc: DPTRACE_ON: NULL
05-22 10:16:32.405 30432-30734/com.neurotec.samples.multibiometric W/linker: /data/app/com.neurotec.samples.multibiometric-1/lib/arm/libdpfpdd5000.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
05-22 10:16:32.405 30432-30734/com.neurotec.samples.multibiometric V/multibiometric.dpfpdd5000: DPTRACE_ON: NULL
05-22 10:16:32.417 30432-30734/com.neurotec.samples.multibiometric W/linker: /data/app/com.neurotec.samples.multibiometric-1/lib/arm/libdpfj.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
05-22 10:16:32.438 30432-30734/com.neurotec.samples.multibiometric V/multibiometric.dpfpdd5000: DPTRACE_ON: <0>
05-22 10:16:32.439 30432-30734/com.neurotec.samples.multibiometric V/multibiometric.dpuvc: DPTRACE_ON: <0>
05-22 10:16:32.470 30432-30734/com.neurotec.samples.multibiometric A/libc: heap corruption detected by dlmalloc_real
05-22 10:16:32.470 30432-30734/com.neurotec.samples.multibiometric A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 30734 (Thread-1971)
andres_velasquez
 
Posts: 7
Joined: May 19, 2017 21:11

Re: Could not detect camera device in my application

Postby MartynasV » May 23, 2017 06:07

andres_velasquez wrote:This is the log when the app crashed and the multidex is disabled

05-22 10:16:28.777 30432-30490/com.neurotec.samples.multibiometric V/RenderScript: 0xb99b5158 Launching thread(s), CPUs 4
05-22 10:16:30.909 30432-30493/com.neurotec.samples.multibiometric I/art: Rejecting re-init on previously-failed class java.lang.Class<com.neurotec.devices.fscanners.nitgen.NDMNitgen$1>
05-22 10:16:30.909 30432-30493/com.neurotec.samples.multibiometric I/art: Rejecting re-init on previously-failed class java.lang.Class<com.neurotec.devices.fscanners.nitgen.NDMNitgen$1>
05-22 10:16:31.128 30432-30493/com.neurotec.samples.multibiometric I/art: Rejecting re-init on previously-failed class java.lang.Class<com.neurotec.devices.fscanners.nitgen.NDMNitgen$1>
05-22 10:16:31.145 30432-30493/com.neurotec.samples.multibiometric I/art: Rejecting re-init on previously-failed class java.lang.Class<com.neurotec.devices.fscanners.nitgen.NDMNitgen$1>
05-22 10:16:31.231 30432-30438/com.neurotec.samples.multibiometric W/art: Suspending all threads took: 19.096ms
05-22 10:16:32.297 30432-30734/com.neurotec.samples.multibiometric I/art: Thread[11,tid=30734,Native,Thread*=0xb9a3e310,peer=0x12cd2280,"Thread-1971"] recursive attempt to load library "/data/app/com.neurotec.samples.multibiometric-1/lib/arm/libusb.so"
05-22 10:16:32.317 30432-30734/com.neurotec.samples.multibiometric I/art: Thread[11,tid=30734,Native,Thread*=0xb9a3e310,peer=0x12cd2280,"Thread-1971"] recursive attempt to load library "/data/app/com.neurotec.samples.multibiometric-1/lib/arm/libibscanultimatejni.so"
05-22 10:16:32.322 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Enter IBSU_RegisterCallbacks (handle=0, events=0)
05-22 10:16:32.332 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Exit IBSU_RegisterCallbacks (handle=0, events=0, pEventName=0xa1f898a5, pContext=0xa1f898a5)
05-22 10:16:32.332 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Enter IBSU_RegisterCallbacks (handle=0, events=8)
05-22 10:16:32.332 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Exit IBSU_RegisterCallbacks (handle=0, events=8, pEventName=0xa1f89835, pContext=0xa1f89835)
05-22 10:16:32.333 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Enter IBSU_RegisterCallbacks (handle=0, events=10)
05-22 10:16:32.333 30432-30734/com.neurotec.samples.multibiometric D/IBSCAN: 0-Exit IBSU_RegisterCallbacks (handle=0, events=10, pEventName=0xa1f89911, pContext=0xa1f89911)
05-22 10:16:32.397 30432-30734/com.neurotec.samples.multibiometric V/multibiometric.dpuvc: DPTRACE_ON: NULL
05-22 10:16:32.405 30432-30734/com.neurotec.samples.multibiometric W/linker: /data/app/com.neurotec.samples.multibiometric-1/lib/arm/libdpfpdd5000.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
05-22 10:16:32.405 30432-30734/com.neurotec.samples.multibiometric V/multibiometric.dpfpdd5000: DPTRACE_ON: NULL
05-22 10:16:32.417 30432-30734/com.neurotec.samples.multibiometric W/linker: /data/app/com.neurotec.samples.multibiometric-1/lib/arm/libdpfj.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
05-22 10:16:32.438 30432-30734/com.neurotec.samples.multibiometric V/multibiometric.dpfpdd5000: DPTRACE_ON: <0>
05-22 10:16:32.439 30432-30734/com.neurotec.samples.multibiometric V/multibiometric.dpuvc: DPTRACE_ON: <0>
05-22 10:16:32.470 30432-30734/com.neurotec.samples.multibiometric A/libc: heap corruption detected by dlmalloc_real
05-22 10:16:32.470 30432-30734/com.neurotec.samples.multibiometric A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 30734 (Thread-1971)

Hello,

Send full log.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 397
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

getDeviceManager().getDevices().size() dont get any camera

Postby andres_velasquez » Jun 05, 2017 01:55

Good day, we have a problem with verilook in android, when we try to get the numbers of cameras, the client object dont retorn any camera.

Disabling multidex isn't a option because our application have many methods calls.

We are basing our code from your multibiometric-sample application and the camera doesn't works too.

testing in a asus zenfone 2 with android marshmallow API 23
andres_velasquez
 
Posts: 7
Joined: May 19, 2017 21:11

Re: Could not detect camera device in my application

Postby andres_velasquez » Jun 05, 2017 01:55

Good day, we have a problem with verilook in android, when we try to get the numbers of cameras, the client object dont retorn any camera.

Disabling multidex isn't a option because our application have many methods calls.

We are basing our code from your multibiometric-sample application and the camera doesn't works too.

testing in a asus zenfone 2 with android marshmallow API 23

Thank you by your support
andres_velasquez
 
Posts: 7
Joined: May 19, 2017 21:11

Re: getDeviceManager().getDevices().size() dont get any came

Postby MartynasV » Jun 05, 2017 06:56

Hello andres_velasquez,

Is camera detected with "SDK\Bin\Android\multibiometric-sample.apk"(VeriLook activity) application?
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 397
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: getDeviceManager().getDevices().size() dont get any came

Postby andres_velasquez » Jun 05, 2017 14:30

MartynasV wrote:Hello andres_velasquez,

Is camera detected with "SDK\Bin\Android\multibiometric-sample.apk"(VeriLook activity) application?


yes martynas, only works with that apk, but with the Android studio project(multibiometric-sample) doesn't work.
andres_velasquez
 
Posts: 7
Joined: May 19, 2017 21:11

Re: getDeviceManager().getDevices().size() dont get any came

Postby MartynasV » Jun 06, 2017 06:23

andres_velasquez wrote:
MartynasV wrote:Hello andres_velasquez,

Is camera detected with "SDK\Bin\Android\multibiometric-sample.apk"(VeriLook activity) application?


yes martynas, only works with that apk, but with the Android studio project(multibiometric-sample) doesn't work.

Hello andres_velasquez,

Build multibiometric-sample apk and send it with issue description to support@neurotechnology.com .
Also please provide SDK revision number(can be found in SDK root directory, in Revision.txt file).
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 397
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Could not detect camera device in my application

Postby Alexander0901 » Oct 18, 2018 15:28

I have the same problem, in programming tutorials EnrollFaceFromCamera, when i try to get the numbers of cameras, the client object dont retorn any camera deviceManager.getDevices().size()=0.
testing in a samsung s7 EDGE with android Oreo API 26.

any help will be appreciated, than you.
Alexander0901
 
Posts: 2
Joined: Oct 16, 2018 16:33

Re: Could not detect camera device in my application

Postby MartynasV » Oct 22, 2018 09:45

Alexander0901 wrote:I have the same problem, in programming tutorials EnrollFaceFromCamera, when i try to get the numbers of cameras, the client object dont retorn any camera deviceManager.getDevices().size()=0.
testing in a samsung s7 EDGE with android Oreo API 26.

any help will be appreciated, than you.

Hello,

Is camera detected with "SDK\Bin\Android\multibiometric-sample.apk" application?
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 397
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Could not detect camera device in my application

Postby LuisG » Nov 06, 2018 17:49

Hi, I just started developing with SDK 10.0, and I found myself with the same issue.
I had no issue with the licenses.
I already check device-sample.apk and face-verification-sample.apk, both crash.
But multibiometric-sample.apk works and also I have no issues when trying to build and run the sample project in android studio.
But when I try my own project using the android sample as base, mClient.getFaceCaptureDevice() is null and mClient.getDeviceManager().getDevices() is 0.
Already try the multiDex both on and off, but no avail.
The log always says:
Operation: CREATE_TEMPLATE, Status: SOURCE_MISSING
I"m not sure if I"m missing the ndf.jet files existing in the sample, but I can"t find the place where they"re being called or used.
Currently testing with Samsung j3 (2016) Android 6.0.1
Any suggestion on how to proceed/troubleshoot would be appreciated.

Thank you.

Luis G
LuisG
 
Posts: 2
Joined: Nov 06, 2018 17:28

Re: Could not detect camera device in my application

Postby MartynasV » Nov 07, 2018 11:21

LuisG wrote:Hi, I just started developing with SDK 10.0, and I found myself with the same issue.
I had no issue with the licenses.
I already check device-sample.apk and face-verification-sample.apk, both crash.
But multibiometric-sample.apk works and also I have no issues when trying to build and run the sample project in android studio.
But when I try my own project using the android sample as base, mClient.getFaceCaptureDevice() is null and mClient.getDeviceManager().getDevices() is 0.
Already try the multiDex both on and off, but no avail.
The log always says:
Operation: CREATE_TEMPLATE, Status: SOURCE_MISSING
I"m not sure if I"m missing the ndf.jet files existing in the sample, but I can"t find the place where they"re being called or used.
Currently testing with Samsung j3 (2016) Android 6.0.1
Any suggestion on how to proceed/troubleshoot would be appreciated.

Thank you.

Luis G

Hello Luis,

Make sure that "Instant Run" is disabled.

"I already check device-sample.apk and face-verification-sample.apk, both crash."
Try installing them using apk files from "SDK\Bin\Android". If applications crash with those apk files, then send me full log.

" mClient.getFaceCaptureDevice() is null"

It is null because you have not set device. You have to set it yourself.

SOURCE_MISSING is returned when you try to capture and there is no capturing device set or when you try to extract template, but there is no image set.

As I understand multibiometric sample does find camera and your application doesn't. Then there might be issue with permissions, first add all permissions from our sample to your application(in Manifest file), then read bellow.

Some permissions are forced to be granted by Android only at the runtime since API23. So it is not enough just to declare them in AndroidManifest.xml. They must be popped up for the user so that he could accept permissions during application startup.
Our application is currently built with API19 target. So permissions are granted when they are declared in AndroidManifest.xml. As you use API23+ you need to pop up permissions so that they could be granted by the user at the runtime.
Documentation:
https://developer.android.com/guide/top ... rview.html
https://developer.android.com/training/ ... sting.html
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 397
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Could not detect camera device in my application

Postby LuisG » Nov 07, 2018 14:33

Hi. Thanks for the quick response.
Make sure that "Instant Run" is disabled.

I never use it.
As I understand multibiometric sample does find camera and your application doesn't. Then there might be issue with permissions, first add all permissions from our sample to your application(in Manifest file), then read bellow.

Some permissions are forced to be granted by Android only at the runtime since API23. So it is not enough just to declare them in AndroidManifest.xml. They must be popped up for the user so that he could accept permissions during application startup.
Our application is currently built with API19 target. So permissions are granted when they are declared in AndroidManifest.xml. As you use API23+ you need to pop up permissions so that they could be granted by the user at the runtime.


Has all permissions, but I notice that:
E/NCore: Error: permission "android.permission.WRITE_SETTINGS" was not granted. Please make sure this permission is defined in AndroidManifest.xml file.
This is strange because the app has the permission, already double/triple check.

But I don't need to use some like BLUETOOTH and RECORD_AUDIO do I still need to leave then in?

Anyway I'll keep trying.
If anyone has any ideas please share.

Best regards

Luis G
LuisG
 
Posts: 2
Joined: Nov 06, 2018 17:28

Re: Could not detect camera device in my application

Postby MartynasV » Nov 09, 2018 07:34

LuisG wrote:Hi. Thanks for the quick response.
Make sure that "Instant Run" is disabled.

I never use it.
As I understand multibiometric sample does find camera and your application doesn't. Then there might be issue with permissions, first add all permissions from our sample to your application(in Manifest file), then read bellow.

Some permissions are forced to be granted by Android only at the runtime since API23. So it is not enough just to declare them in AndroidManifest.xml. They must be popped up for the user so that he could accept permissions during application startup.
Our application is currently built with API19 target. So permissions are granted when they are declared in AndroidManifest.xml. As you use API23+ you need to pop up permissions so that they could be granted by the user at the runtime.


Has all permissions, but I notice that:
E/NCore: Error: permission "android.permission.WRITE_SETTINGS" was not granted. Please make sure this permission is defined in AndroidManifest.xml file.
This is strange because the app has the permission, already double/triple check.

But I don't need to use some like BLUETOOTH and RECORD_AUDIO do I still need to leave then in?

Anyway I'll keep trying.
If anyone has any ideas please share.

Best regards

Luis G

Issue SOLVED.

Solution:
Don't remove "android.permission.RECORD_AUDIO" permission, as it is required to use camera.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 397
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania


Return to Public

Who is online

Users browsing this forum: Helenalmr and 1 guest

cron