[Free] FlipBook extension

Create your magazine or your brochure with Flipbook extension. Simply add the images set some parameters and voilà that's it.

  • Activate or deactivate the zoom, manage the ratio and set the overflow

  • Block to manage assets-

  • Unlimited slides

BTW) used Tools Extension to manage assets (AppInventor2 iussue)
Thanks to @Taifun

flipbook.aia (462.9 KB)

com.appybuilder.chiccovision.FlipBook.aix (14.2 KB)

Built with: AppyBuilder Code Editor

PS)
My personal opinion about the thread extension vs blocks is that it is
always better to use blocks, instead of extensions.
See example of @TIMAI2 about my ImgToBBHost extension.
Extensions are often just shortcuts, but in a tool like AppInventor2, created to teach, many times they are inappropriate.

Regards Marco.

15 Likes

I like this extension :grinning: :grinning:

1 Like

I am trying to use this extension but something does not work in my case. I have 74 pages to flip in book format, these are the original code and the test with your images. In both cases the pages are displayed empty. P.S. the list is loaded reading a CSV file and inserting separators. What I did wrong?
Cattura-8


Another question: in the html files are embedded the URL of the images on the Lidl brochure, do I need to modify it to give access to my images?
Thanks,
Massimo

1 Like

FlipBook extension: problems to visualize images

Hello guys,
I wrote a reply this night to the "Flipbook extension" post (Extension category). I am testing the flipbook.aia example, just changing the original images with mine. But if I change any image it is not visualized anymore, I see just an empty image. So, I think I did not understand how to use the extension.
Has anyone a little example that works with custom images? Just to know if it works and how should be used the extension. In the example there is a couple of html files containing references to some images, have I to modify also these files? Seems to me that the flip is done using some JavaScript inside those files. Any help will be appreciated.

1 Like
  • If you look at the example aia provided in the first post here, the images are not loaded as a list but as a long string. You will have to build this string from your list.

  • Marco has simply demonstrated that you can use local or online image in his extension.

  • The "flipping" has nothing to do with the http references or javascript, it is all done in java inside the extension. (although it does appear to be using a webview)

As said, try the example aia, you will then understand how it works.

1 Like

I already tryed it just changing the images and I do not see the new images but only empty images. I tryed to use the list after the original way with different images did not work. The 2nd procedure follows the original example using 2 of the original images and it does not work also, for this reason I suppose I did something wrong but I did not understand where because I modified only the images and the name of the VA to reflect its use.

1 Like

I am not having a problem adding my own images to the example aia.

1 Like

The html files are just there as examples, they have no impact on the extension. You can delete these.

1 Like

I still have and I do not understand why... I supposed to have problems with the path, so I made this test modifying a little bit the flipbook.aia, this is the init procedure:


and this the other relevant procedure:
Cattura-11

This Is correct working from airtable with another my extension

It Is similar

Using the TaifunFile.Exists block will return true or false, so will not load an image.

1 Like

I used it in other test I made after this step.

OK, I have a more precise and detailed report.

  1. I imported your flipbook.aia example and tested using Android 8 and 11 smartphones without any change by me I do not see img004.jpg and img005.jpg
  2. My 1st modification was flipbookR1.aia where I only added a couple of procedures to test if the 2 files exist and find where they are, using Notifier1 to see the results. Results: img004.jpg found in: file:///storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/assets/img004.jpg
    The path is the same returned by PathToAssets so I would assume that I would pass just "img004.jpg" to MakeFlipbook and it should find it because I passed PathToAssets to SetAssets. But I still do not see img004.jpg but just an empty image.
    So,I was wrong when I said I was not able to see any custom image because I am not able to see any image stored locally. Instead I am able to see the original images stored on the web.
    I attached flipbook.aia and flipbookR1.aia:
    flipbook.aia (462.9 KB) flipbookR1.aia (495.9 KB)

Try this

flipbookR1_revised.aia (623.8 KB)

Does this work for you?

Those two images were corrupt :rage:

Unfortunately no... I see only empty pages, they flip but they are empty... I am sure that is working in your side otherwise you would have not posted it, but here nothing changed. So... I still do not understand why it does not work. I can say only I am testing it on android 11 and using companion.
I tryed to make the apk but returns this error: "Error generating Yail for screen 5472632069029888_Screen2: : h is undefined. Please fix and try packaging again." so I remove Screen2 and built the apk.
After that yours does not work with Companion but installing the apk works. Now I will test the original and also mine to see if the apk(s) work.

What image was corrupted? I see each image with the preview in AI2, it was the 1st check I did when I had the problem. I already had strange problems because an uploaded file become corrupted (I do not know why) so since that I check each uploaded file with the preview or downloding it after I upload it.

The images img004.jpg and img005.jpg would not open on my system.

I am testing on Android 10 emulator under API 30 which works

But you are correct, it appears to be completely broken in companion on Android 11.

It works in companion on Android 11 with online images.

I believe this is because the webviewer (which the extension uses for display) is currently broken in companion mode, being unable to create an html file from text. The fix is on its way in the next release. Or this is due to permissions required to read files from the ASD on API30 / Android 11 for a generated html file.

Or the problem is something else I haven't found yet.

OK, I can live with this problem at the moment. The application is a speaking flipbook, it will have more than 50 pages, most of them with some text and a recording read from an actress, some others (credits and so on) may have a text that will be read by the TextToSpeech component so I upload a CSV file specificating the image of the page, the mp3 file to play and/or the text to read. In this case it is not so important to see the images during debugging and testing, it is more important to have images and voice synchronized, stopped and restarted turning the pages and so on. And find a better way to load the images together instead of one by one.