Articles & Information.

Media in apps

Select a topic:

Choose from one of the topics below to browse other articles

Last updated by Ryan Miller on September 04, 2014 08:01

Before proceeding it is important to note the limitation of Media within Mxit and with mobile devices in general. By default Mxit only supports pictures and voice clips, however there are ways to get other media types catered for. 

1. Uploading files to an app (Mxit currently only support images)

File (camera,  file from device) can be sent by user at any time, the next file type input field that occurs will send through the file.

<form action="upload" method="post" enctype="multipart/form-data"><br> Take a photo now (Options -> Camera)<br> <input type="file" name="img" /><br> <input type="text" /> <!-- This input box is so that the user should type something to upload the file, or make it a dropdown box with one option to make it a clickable link --><br> <input type="submit" name=”I’m done uploading, save it” /><br></form><br>

Receiving a photo or other file

You can receive files uploaded by your app's users by using the File input type as noted above.
For your user to submit a file through the form, they must complete one of the following steps:

The user presses Options ->

and

Take a camera pic: Camera
To send an already saved picture on your phone: Options -> File

Details: The uploaded file is kept in memory when the user sends the file to your app. Your app will be POST’d the information when the user completes the next form on the app. To complete a form there must be at least one element. An input element should be created for this purpose. A clickable form element like a dropdown with one element e.g. “I’ve sent the file, I’m done” should suffice. 

Image Sizes:

All images must be 100k or less. For images bigger than this, a generic "file too big" message will be displayed.

2. Uploading videos to a Mobi Portal Site (not supported by Mxit, user will have to “break out” and upload files to the site)

Example of a sites that does this well: mokomo.com. 
Client will moderate the media/ content manually and select which ones they want to have in the app.


3. Downloading videos from an app

<a href="http://www.something.com/something.3gp" onclick="window.open(this.href);returnfalse;">Check it out!</a>

Also please note that the file format mp4 will not be supported on the lower to mid-range phones. This is just something to keep in mind, to give a wider audience access we would recommend the format be 3gpp or simply .3gp

It would really be beneficial to ensure the mimetype is set to mtype = "application/force-download"; which instructs the download to force a download of this content by default some phones will try and play the video in the background.

4. Downloading other files

How do you create a link to a website outside of Mxit?

Opens a web/wap page inside Mxit:

<a href="http://www.somesite.com/">some site</a>

 Opens a web/wap page outside Mxit:

<a href="http://www.somesite.com" onclick="window.open(this.href); return false;" > some site</a>

Note that any websites you link to should be optimized for display as a WAP or .mobi site on a range of handsets, and you should avoid loading a large number of high-bandwidth images. (Mxit users are sensitive to how much bandwidth is consumed on their phones!)

5. Notes

1. When creating a link to a website outside of Mxit, be cautious of using option 4.1 (above) as this will render the site you’re linking to inside the app. Users won’t be able to navigate to the app.
2. Mxit does not stream or play video files, therefore users will have to download files (using the method described in 4.2), and use their phone’s media player to play the video file.
3. Without specifying the mime type header (as mentioned in 3 above), certain phone models will automatically play the file without the user being aware of it being played.