miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
05/11/14 06:54 AM (10 years ago)

Smugs Android HTML makes me error

Hello I tried with Smugs Android HTML and in Eclipse, I got error: The declared package "com.buzztouch" does not match the expected package. What am I doing wrong? Thanks
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/11/14 07:59 AM (10 years ago)
Did you try to rename the package or redownload it? The package should have the name you gave it in the buzztouch control panel, unless you imported another screen after you downloaded it. LA
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
05/11/14 10:39 AM (10 years ago)
I changed package name in SW_androidHTML.java also and it works now. I also included simple audio player: <audio controls="controls" preload="auto" tabindex="0"> <source src="mysong.mp3" type="audio/mpeg"> Loading... </source></audio> This audio does not work in Smugs Android, but I think every html code should. Any advice?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/11/14 12:44 PM (10 years ago)
That was an error; the package should have been 'com.buzzTouch' (notice the case of the 't'). In any event, it's been fixed. If you redownload your package you should get the correct (updated) version. If you're self hosted, update your plugins with a new copy and all should be good. Let me know if this doesn't work for you. Cheers! -- Smug
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
05/11/14 11:15 PM (10 years ago)
Hello, I have now version 1.1 installed, but my audio still doesn't work. It is just simple: <audio controls="controls" preload="auto" tabindex="0"> <source src="mysong.mp3" type="audio/mpeg"> Loading... </source></audio> which works fine on iOS, not on Android.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/12/14 12:00 AM (10 years ago)
"where" is 'mysong.mp3' file located? Remember, an HTML file isn't the Android OS, so any files referenced from within an HTML file will need to be relative to that HTML file, and have nothing to do with Android directory and file structure. According to your code example above, the 'mysong.mp3' file needs to be 'in the same directory as your html file' (BT_Docs, yes?) in order for it to work. Is it? Cheers! -- Smug
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
05/12/14 01:05 AM (10 years ago)
Thanks for quick answer, I got my html and audio file located in BT Control panel>Files/Media>Documents. Then I downloaded Android project and copied both files again in Assets>BT_Docs. Result is that I can see audio controls, but playhead is in the end of song. Milan
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/12/14 08:26 AM (10 years ago)
You try this on device or emulator for Android? LA
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
05/12/14 08:32 AM (10 years ago)
Tried on both, everywhere same result. I also tried with Custom Html plugin, but always works on iOs, Android not.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/12/14 08:36 AM (10 years ago)
You are not uploading the song file to buzztouch are you? Send a link to the song so I can try it please. LA
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
05/12/14 08:48 AM (10 years ago)
I uploaded it in Media-Documents, where html file is. Here is link: http://www.apps-mobi.net/bt/files/applications/EA5387DE2B6CB5C9B048F9D24/documents/adijo.mp3
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/12/14 08:50 AM (10 years ago)
Buzztouch doesn't handle media files but give me a few and I will try your link. LA
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
05/12/14 08:58 AM (10 years ago)
I don't know what exactly you mean. You can't hear mp3 on upper link?
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
05/12/14 09:05 AM (10 years ago)
I forgot to tell you that I work on local server.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/12/14 09:24 AM (10 years ago)
Yes I can hear it. LA
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
05/12/14 09:31 AM (10 years ago)
I am trying to create a songbook of 60 songs: each is single html with only 2 items: one text and one song. If user wants to hear song, he clicks on audio control and play it. It all works fine on iOs, app is in Apple AppStore for a few months now. I am desperate because I can't finish the same app for Android.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/12/14 11:31 PM (10 years ago)
I'm looking into it, but for the moment all I can say is this does not work: <audio autoplay="" controls=""> <source src="jrsr.mp3" type="audio/mpeg"> Your browser does not support the audio element. </source> </audio> And this does: <audio autoplay="" controls=""> <source src="http://your.server.com/path/to/jrsr.mp3" type="audio/mpeg"> Your browser does not support the audio element. </source> </audio> I can't say why it doesn't like local files, but a URL works fine. I'll see if I can find some kind of fix. For the time being, that's the only viable workaround. Cheers! -- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.