Search code examples
app-inventor

can i send a tiny database from app inventor via whatsapp


I am trying to send a voice note from app inventor via whatsapp can I do that ,the activity starter isn't helping me at all. I tried creating a file text but still cant get through.It says unsupported file format.


Solution

  • Yes you can share via WhatsApp. You need to add element "sharing" for that. Here's the example of sharing the image file to the whats app through the app created with app inventor.

    But first you need to understand that there are two paths for any files while creating apps with app inventor.

    1. Path where files are stored while development (live previews)
    2. Path where files are stored after producing the app

    path while development is: file:///mnt/sdcard/AppInventor/assets/myFile

    path after production is: file:///android_asset/myFile

    So while using "SHARE" component of app inventor you have to specify both paths to avoid any errors in future.

    So here is the app:

    Front End Arrangements:

    app that shares the shown picture

    Block Arrangements: Block Arrangements

    Pay attention to the if then else block. It says if the image is not in the development path then the app is installed in the phone(produced). It saves our time to change path very often(and saves us from error if we forget to change paths)

    Snapshot from the app: enter image description here

    After pressing share button: enter image description here

    After sharing through whats app: enter image description here