yodacom
Posts: 0
Joined: Sat Jul 20, 2013 2:15 pm

How to import an audio file into my app

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to import an audio file into my app

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

John5269257
Posts: 0
Joined: Mon Jun 17, 2013 11:04 am

How to import an audio file into my app

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

John5269257
Posts: 0
Joined: Mon Jun 17, 2013 11:04 am

How to import an audio file into my app

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

David6064062
Posts: 0
Joined: Sat Jul 20, 2013 1:34 pm

How to import an audio file into my app

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to import an audio file into my app

HI Christopher,

Thanks for your update.

Regards.

John5269257
Posts: 0
Joined: Mon Jun 17, 2013 11:04 am

How to import an audio file into my app

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?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to import an audio file into my app

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.

John5269257
Posts: 0
Joined: Mon Jun 17, 2013 11:04 am

How to import an audio file into my app

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to import an audio file into my app

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

Return to “Issues”