Photo Upload for MIT App Inventor

Hi

In the app i created ,i have set it up so that when the button is clicked,the camera opens and take a photo.i want to it so that when the button clicked,i can upload a photo from the gallery instead .if possible pls show me how to do it.

LoadingTruckRevised1(3).aia (129.5 KB)

Use an image picker component.

If you want to offer a choice (take photo or pick image) then use a notifier choose dialog.

yes

pls can you share code

See the documentation provided for the imagePicker and the notifier components.

How do you do that? Can you explain a little?

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps

How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun

LoadingTruckRevised1(4).aia (129.6 KB)

Hi ,

I need to following improvements for my app

1.the pdf generated by the app should automatically continue onto a second pacge when needed

2.when the user taps the take photo button,the app should allow them to either:

open the camera an capture a new photo , or

select an exisiting photo from the phone’s gallery.

3.Even if the app is closed ,i want to be able to enter the shipment id later and retrieve all the previously saved shipment details and photos.

4.pls provide the required code or blocks to implement these features.

KIO4-PDF does not paginate. What you could do is split your containing arrangement into two, then make two pdfs. Alternately, search out another extension that can paginate ?

The method for this has already been shown in previous posts in this topic.

I presume you mean you want to be able to return to a previously created "shipment" and to continue editing. You will need to save all the details to a database, text entries, image paths etc. (tinydb or sqlite) and then recover these when you load the shipment. This scenario has been covered several times on the community. Do a search or look through the FAQ.

hi

can you provide an extension that allows me to generate the pdf as two pages?

This extension doesn't make separate pages but will create a pdf of the entire content of an arrangement, not just what is visible:

How about a hybrid approach where you reuse the Arrangement that generated a one page pdf and add a page number to it.

Generate numbered single page pdf files and share them one by one.

Since shipments only grow and never change otherwise, this moves the storage burden onto whoever is collecting the shared one page pdf files.

Add the page number to the pdf file name, after the shipment number, with a couple of leading zeroes to allow for sorting the directory listings by file name.

IMHO makes more sense for it all to be on one long page. Why need two pages specifically?

Hi ,

It is best to print the PDF on two pages because the photos will appear smaller when you print it.

So you can't find a PDF creator that can be told to start a new page mid-pdf?

yes

Here is an example of a two page pdf. For this to work your capture arrangements must be inside a vertical scrolling arrangement.

longPagePDF.aia (27.6 KB)