perdon soy nuevo, me explico quiero abrir la camara por defecto del mobil hacer foto y poder aceptar o cancelar, hasta ahi todo correcto. pero si le doy aceptar deberia guardar la foto y no lo hace, me crea un archivo 0 bytes. el codigo esta en el ejemplo del link que he pasado antes. si no se puede con este metodo me puedes explicar otro. graciaaaaaaassssssssssssssssssss
#Region Project Attributes
#ApplicationLabel: asd
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#End Region
Sub Process_Globals
End Sub
Sub Globals
Private ImageView1 As ImageView
Private Button1 As Button
Private Button2 As Button
Dim onoff As Boolean
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
End Sub
Sub Activity_Resume
If onoff = True Then
onoff=False
ImageView1.Visible = True
'ImageView1.Bitmap = LoadBitmapSample(File.DirRootExternal, "1.jpg",ImageView1.Width, ImageView1.Height)
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
camera(File.DirRootExternal, "1.jpg")
End Sub
Sub Button2_Click
Galeria(File.DirRootExternal, "1.jpg")
End Sub
''''''''''''''''''''''''''''''''''''' CAMERA + CROP '''''''''''''''''''''''''''''''''''''''''''''
Sub camera(Directory As String, PictureName As String)
Dim i As Intent
onoff = True
i.Initialize("android.media.action.IMAGE_CAPTURE", "" )
i.PutExtra("crop", "true") 'crop ON
i.PutExtra("aspectX", 0) 'crop aspects
i.PutExtra("aspectY", 0) 'crop aspects
i.PutExtra("outputX", 200) 'crop size
i.PutExtra("outputY", 150) 'crop size
'' i.PutExtra("output", ParseUri("file://" & File.Combine(Directory, PictureName))) 'output folder you set OpenCam(File.DirRootExternal, "1.jpg")
StartActivity(i)
End Sub
Sub ParseUri(FileName As String) As Object
Dim r As Reflector
Return r.RunStaticMethod("android.net.Uri", "parse", Array As Object(FileName), Array As String("java.lang.String"))
End Sub