Android Question Access JPG File

MODERN TALKING

Active Member
Licensed User
Longtime User
Hi guys,

Please guide me on how to access a picture I snapped with my phone - which is saved on the phone.

With Code.

I tried: (File.DirRootExternal, "picture1.jpg")

But this doesn't work.

Thank you guys!
 

ilan

Expert
Licensed User
Longtime User
sorry the last post was wrong

try something like this:

B4X:
Sub Activity_Create(FirstTime As Boolean)
    myOCR.Initialize(Me, "myOCR", "0451729a-3d4e-4ef5-9bc3-2b3c1ccd60e0")
    ProgressDialogShow("WORKING")
    loadimage
End Sub

Sub loadimage
    If File.Exists(File.DirRootExternal,"picture1.jpg") Then
        File.Copy(File.DirRootExternal,"picture1.jpg",File.DirInternal,"picture1.jpg")
        myOCR.ExtractFromImage(File.Combine(File.DirInternal, "picture1.jpg"), "", "scene", 20000)
    End If
End Sub

EDIT: i think it's better to do the loading out of activity_create
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…