java - How do i make a validation about the missing flash camera on android? -


im making flash aplication school proyect phone doesn't have flashlight so.. have idea make validation if phone dont have flashlight light screen.

can me ? :d

i think post may halp implement idea:

if planing use inside function onupdate or onenabled etc of appwidgetprovider, functions have context input parameter. can use context using packagemanager doing here.

also in question mention flashlight. check if need feature_camera_flash or feature_camera.

context context = this; packagemanager packagemanager = context.getpackagemanager();  // if device support flash? if (packagemanager.hassystemfeature(packagemanager.feature_camera_flash)) {     //yes     log.i("camera", "this device has flash supported!");  }else{     //no     log.i("camera", "this device has no flash support!");  } 

from: check if device has flashlight

check also:

hope help


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -