Mintoris Forum

Author Topic: Cancel takephoto  (Read 1931 times)

hoyoyo80

  • Full Member
  • ***
  • Posts: 66
Cancel takephoto
« on: Jan 30, 2016, 03:20 AM »
Hi.
I have problem with my app.
Im using html form and using button to open camera and take photo manually and then assign it to a variable and refresh my html form to display the photo on the form.All went great until my staff push the button and then cancel the photo taking(back button on their tablet).Ive checked and the file is saved as blank photo and also assign to the variable. Any way to detect photo taking cancellation and not assigning the file name to variable? Thanks

Here's the code after press the button

Case "slot0"
         if slot$(0)="" Then
            if not  isDir(aid$) Then
                MkDir aid$
           endif
           
              t=Time()
              f$=FormatTime$(t,"dd.MM.yyyy.HH:mm:ss")
              pic$=f$+".jpg"

              TakePhoto aid$+"/"+pic$
               slot$(0)= aid$+"/"+pic$

              refreshform()
             

         Endif

   
     End Select

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: Cancel takephoto
« Reply #1 on: Jan 30, 2016, 03:25 AM »
I would use the Dialog command to pop up a box after you take the photo. Ask if they want to retake it. If they retake it just delete the first photo and retake it.


hoyoyo80

  • Full Member
  • ***
  • Posts: 66
Re: Cancel takephoto
« Reply #2 on: Jan 30, 2016, 04:06 AM »
  :D Oh my‼ Thats right. Quite easy solution hahaha.

Thanks Chuck
I would use the Dialog command to pop up a box after you take the photo. Ask if they want to retake it. If they retake it just delete the first photo and retake it.