Android Question Image uploading

systems1

Member
Licensed User
Longtime User
Hello

I am a beginner here in basic4android. Can anyone give me the idea how to upload the image to imageview from the application. I mean i have to use mysql & webserver or can i do this with sqlite without a need of webserver. I dont know where to store the uploaded image. Folder inside b4a Files or folder inside webserver as how we normally do.

Also get me the links for similar thread which can be helpull

Thank you
 
Last edited:

systems1

Member
Licensed User
Longtime User
I just need to upload six images. Is it possible to store these images into the FILES folder of b4a...?
 
Upvote 0

systems1

Member
Licensed User
Longtime User
Ok.. Is there any simple example or thread to upload the image..?
I found here in the forum some examples but most of them are using http to store into the server. I did not find any example of storing the files/images inside Files folder of b4a
 
Upvote 0

systems1

Member
Licensed User
Longtime User
Ok. Let me explain in brief what i want to do.

I want to store person details into a database. I am inserting name, mobile number and photo of each person.
This i can do using SQLite. But where should i store this photo[file] which i upload for each person ?
And also i should display the same image on front end on imageview...

Just a app to upload person details with name, mobile number and photo and display the same.
How can i do this ?
 
Last edited:
Upvote 0

systems1

Member
Licensed User
Longtime User
Hi Erel,

Can you please check

How I can browse an image and save it to a program specified folder in mobile or tab and keep the path of that uploaded image to a Sqlite database table.

So When I want to display the uploaded images in my app, I can use the path in the Sqlite table to show images.


Thanks
 
Last edited:
Upvote 0

systems1

Member
Licensed User
Longtime User
Hi Erel,

I did not mean about getting image path and inserting into the table. I was asking about VIEW to upload a image.

I searched in the forum and i think i can do this using File dialog.

Thank you
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I think "upload" is not the right name for it.

"upload" are used if you want to upload a file from your pc to a webserver. Or FROM your android (any path) to a Webserver.

A view is an object. You can ADD things to it. viewname.ADD or whatever...

Maybe you should explain DETAILED what you want to to. What code you have till now for it (post the code). And what errors you get.
 
Upvote 0

systems1

Member
Licensed User
Longtime User
Hi,

In HTML we have <input type="file">

file - file Defines a file-select field and a "Browse..." button (for file uploads)

I wanted to do the same here in basic4android.
This can be done using File dialog

Thanks
 
Upvote 0

systems1

Member
Licensed User
Longtime User
Hello,

Below is the code which i use to browse the images from gallery. Here when i press the button browse, it is listing the filenames of the images.
But instod of displaying the filenames i want to show the images.
When i select and click on any image then i should get that particular filename of the image that i clicked.

How can i do this...?

Sub btnFile_Click

Dim fd As FileDialog
Dim fileList As List
fd.FastScroll = True

fd.FilePath = File.DirRootExternal&"/DCIM"
ret = fd.Show("B4A File Dialog", "Yes", "No", "Maybe", Bmp)

If fd.ChosenName <> "" Then
File.MakeDir(File.DirRootExternal , "images")
File.Copy(fd.FilePath,fd.ChosenName,File.DirRootExternal & "/images",fd.ChosenName)
Else
Msgbox("You have not selected any file","Select file")
End If

End Sub
 
Last edited:
Upvote 0
Top