Page 4 of 7

How to import an audio file into my app

Posted: Fri Oct 31, 2014 4:38 pm
by yodacom

Gave up and moved on to other development options using Angularjs with nodejs


How to import an audio file into my app

Posted: Fri Oct 31, 2014 5:14 pm
by Evgene Karachevtsev

Hello David,

Actually this feature was added about a year ago . At the source tab you can add any kind of file: binaries (audio, video, images, fonts, jar, dll,...) and text (js, css, html, json, java ...)
Please read more here http://devcenter.appery.io/documentat...
http://devcenter.appery.io/documentat...
And by the way AngularJS will be added to Appery.io through one release


How to import an audio file into my app

Posted: Fri Oct 31, 2014 6:09 pm
by John5269257

Hi Evgene

I've been writing phonegap code to download my media files to the app. I would love to throw it away. I don't know how I missed this.
Can I ask
What size limitations are there, and how to reference them in the app (Appery.getImagePath?)

Thanks
John


How to import an audio file into my app

Posted: Sat Nov 01, 2014 11:32 am
by John5269257

After some experiments it looks like I have enough capacity, as long as I upload 40MB chunks. That's brilliant. And it works on the web, just using relative paths. The one remaining problem is making those same files accessible in an app, where they are effectively in hidden storage.

[edit] How do I construct a URL that points to a file uploaded at app creation?

Thanks
John


How to import an audio file into my app

Posted: Sat Nov 01, 2014 2:05 pm
by David6064062

Hi Evgene

This looks good..

OK so I can add audio files, it looks like I have to add them multiple times into the different sections (Android, IOS etc).

Having done this, I then drag an Audio Element onto a page. I then need to add the src to the properties, the documentation says this is a URL. What URL do I use to access a file in the Source Tree.

Thanks

David


How to import an audio file into my app

Posted: Sun Nov 02, 2014 11:45 pm
by Yurii Orishchuk

HI Christopher,

Thanks for your update.

Regards.


How to import an audio file into my app

Posted: Mon Nov 03, 2014 11:42 am
by John5269257

Bad news

I wonder if someone from Exadel could confirm (or not) what I've found.

I've spent some time trying to work out why I can't play audio or video from resources uploaded into the source tree, pointed to as file:///android_asset/

Images display, but sound and video won't play.

I've found these bug reports:

Video:
https://issues.apache.org/jira/browse...

Audio:
https://issues.apache.org/jira/browse...

Bottom line seems to be that Android apps can't play HTML5 video or audio from file:///android_asset/. They have to be transferred to external storage.

Is this Exadel's understanding of the current situation? Have you encountered any workrounds?


How to import an audio file into my app

Posted: Mon Nov 03, 2014 2:45 pm
by Evgene Karachevtsev

Hello!

There is a small inaccuracy. Let's say you've added audio 1.mp3 file in the project's tree, for example in an existing folder WEB_RESOURCES/files/views/assets/image. Then on the page of your application, you can add audio component http://devcenter.appery.io/documentat...
and specify in its properties
Src files/views/assets/image/1.mp3
Type audio/mpeg
Buttons will be displayed on the page and you will be able to listen to the uploaded file.


How to import an audio file into my app

Posted: Mon Nov 03, 2014 8:27 pm
by John5269257

Hi Evgene
Your comment looks like it's about the web, rather than an android app. Am I correct? I can play out of the source tree on the web using relative paths, its android apps that cause the problem.
John


How to import an audio file into my app

Posted: Tue Nov 04, 2014 7:36 am
by Evgene Karachevtsev

Hello John,

In Appery.io you don't make native apps for Android or IOS, you get a hybrid app (Phonegap app) http://blog.appery.io/2014/05/what-is...
So everything that runs in a web application, will be run in an application built using Appery.io