I am trying to connect to web page chat. And i get the error
Camera is not found.please make sure it is not blocked by another program
I give permision for camera and of course i dont use camera in another program.
Any suggestions ?


We are unable to reproduce this, the camera works on our devices after enabling the permissions.

Which Delphi and Android version are you using?
Can you give us a sample project (or website) that we can use for testing?

I use Delphi 10.4.2
Sdk 25.2.5
My phone is Samsung Z3 Fold.
A similiar page to test is

Are you giving permission for the camera manually? You'll need to give permission to audio recording as well. From the source code of the linked page:

const options = {audio: true, video: true};
    .catch(function(e) {
      alert('getUserMedia() failed');
      console.log('getUserMedia() error: ', e);

Notice audio: true, which means it needs audio permissions too. Doing this from code:

procedure TForm4.Button1Click(Sender: TObject);
  CAMERAPERMISSION = 'android.permission.CAMERA';
  AUDIOPERMISSION = 'android.permission.RECORD_AUDIO';
  if not PermissionsService.IsPermissionGranted(CAMERAPERMISSION) or not PermissionsService.IsPermissionGranted(AUDIOPERMISSION) then
    PermissionsService.RequestPermissions([CAMERAPERMISSION, AUDIOPERMISSION],
      procedure(const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray)
      procedure(const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>)
        //Navigate to URL only if BOTH permissions are granted
        if (Length(AGrantResults) = 2) and (AGrantResults[0] = TPermissionStatus.Granted) and (AGrantResults[1] = TPermissionStatus.Granted) then
          TMSFNCWebBrowser1.URL := '';

I tried your code but not work to me.

compile project and i click allow.

open blank site not work.

if i rem the line of your code
if (Length(AGrantResults) = 2) and (AGrantResults[0] = TPermissionStatus.Granted) and (AGrantResults[1] = TPermissionStatus.Granted) then
the site loads

when i click start i take this error.

Did you get another popup asking for audio permissions & enabled it?
Have you added the Record audio permission to your project?

Yes i take a second popup says to allow record audio but when i press start still takes the same error.

Add Modify audio settings to your permissions as well.

Thank you very much works.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.