0

I am tring to do a really basic web container app based on the techinques in this article: https://medium.freecodecamp.org/how-to-turn-your-website-into-a-mobile-app-with-7-lines-of-json-631c9c9895f5

The problem is that, on android, when the multipart selection button is pressed it is just ignored. Even using this basic form:

<form action="upload.php" method="post" enctype="multipart/form-data">
    Select image to upload:
    <input type="file" name="fileToUpload" id="fileToUpload">
    <input type="submit" value="Upload Image" name="submit">
</form>

My external Json is:

{
  "$jason": {
    "head": {
      "title": "web",
      "actions": {
        "$foreground": {
          "type": "$reload"
        }
      }
    },    

"body": {
      "background": {
        "type": "html",
        "url": "https://website.com/",
        "action": {
       "type": "$default"
     }

      }
    }
  }
}

My Strings xml is:

<resources>
    <string name="app_name">web</string>
    <string name="url">https://website.com/json/live_a_app.json</string>
    <string name="launch">file://preload.json</string>
</resources>

And I have added this to the manifest:

<uses-feature android:name="android.hardware.camera" android:required="false" />
   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Any help would be greatly appreciated, Thank you!

fixdreamer
  • 111
  • 9

1 Answers1

0

You can't do that with Jasonette, the whole idea of Jasonette is to use native components doing so would be a hybrid app and is not the point of Jasonette, make sure to use the native components from the documentation, the Web container is only to display rich content but is not going to respond to user touch.

So keep in mind web containers are designed as a dynamic output method, not as an input method

Scene
  • 137
  • 1
  • 5