Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 19    Views: 88

rossideas
Aspiring developer
Profile
Posts: 145
Reg: Jul 24, 2011
Albuquerque
1,450
07/16/12 10:03 PM (11 years ago)

Found a Bug menuListSimple.java

Just started working on my own server today v2.1.7 with android and could not get a background image to work with Menu Simple (all day). I compared the code to menu buttons and this is missing in menuListSimple.java: //setup background images.. if(backgroundImageWorkerThread == null){ backgroundImageWorkerThread = new BackgroundImageWorkerThread(); backgroundImageWorkerThread.start(); } So I added it and got my image working. FYI also need list background colors clear... Just thought someone might want to know... Ross
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/16/12 11:38 PM (11 years ago)
Great find! We'll get the plugin updated right away. Thanks for spending your day finding something we should have already known about!
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/17/12 01:53 AM (11 years ago)
Kewl ... I've been waiting for this too. I also lost the best part of a day a while back doing the same thing :( http://www.buzztouch.com/forum/thread.php?tid=65DF2C2FC8A9860A9E2EF4C Just grateful someone will take a look!!! Thanks David and @rossideas Should we keep an eye on the self hosted server forum or look for updates in our self hosted panel? cheers
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
07/17/12 06:38 AM (11 years ago)
Excellent. Thanks! I've been wrestling with the BTM Advanced menu on Self Hosted 2.0 for Droid trying to get a menu with a header image. It's buggy but compiling but no image. I was going to fudge it and just use a simple menu and put a image in the bkg up top to mimic the 'header', drop the menu down a bit and call it a day. When that also failed I was looking to plot a new course..... I want to stick with the 2.0 and use that new quiz! Pretty easy to find where one would place that code?
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/17/12 06:46 AM (11 years ago)
@ATRAIN53 Well done! I can't even get my apps to compile on android without having to delete the BTM menuListSimpleAdvanced files. Are you able to document what you have done to get that far? BTW I'd be more than happy to pay @David for a plugin that works on Android :) perhaps we need a bounty system or chip in system ... just my 2 cents.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
07/17/12 07:31 AM (11 years ago)
Sounds like we're hammering at the same thing. Your post in this thread sounds like you have it working? https://www.buzztouchmods.com/downloads.php?cat_id=1&download_id=13 Seems like some do and it can, but how.... What platform are you using Eclipse on? Mac/Win? If I download the package on my Mac system, delete the files as instructed in that thread and import the project I can compile it. I can't use that menu, but the project works. If I download the same package on a WIN system and follow the same exact steps, i still get close to 200 issues and it won't compile. Same level SDK and Andoid Tools, but there is something different happening there between the 2 platofrms and I don't know what it is.. If only that Android emulator worked 1/10 as fast as the IOS one for testing this kind of stuff. Every trial and error is taking a good 30 min, very slow and painstaking to try to nail this.....
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
07/17/12 01:53 PM (11 years ago)
Thanks Ross - got your code working in my menu and have an image now. (the clear row concept is a good idea) nice find. Anyone have any luck adjusting the row heights/font size in this menu? Seems like all the parameters are in this file. No matter what sizes i try and code i hack the menu rows seem to stay a pretty consistent size. I commented out all the variables and hard coded values in there and it's making some progress, but there must be some other option that controls this and overrides what i'm hacking....?
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/17/12 03:44 PM (11 years ago)
Quote: "If I download the package on my Mac system, delete the files as instructed in that thread and import the project I can compile it. I can't use that menu, but the project works. " @ATRAIN53 Unfortunately, that's exactly where I am up to as well (on the Mac with eclipse)! I ended up using menu buttons instead for my last project. You said the above code from Ross worked in the menuListSimple.java file Is there any particular place where it should go?
 
rossideas
Aspiring developer
Profile
Posts: 145
Reg: Jul 24, 2011
Albuquerque
1,450
like
07/17/12 03:49 PM (11 years ago)
Between setup background colors and setup navigation bar... Here is the code: //onCreate @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); this.activityName = "BT_screen_menuListSimple"; BT_debugger.showIt(activityName + ":onCreate"); LinearLayout baseView = (LinearLayout)findViewById(R.id.baseView); //setup background colors... BT_viewUtilities.updateBackgroundColorsForScreen(this, this.screenData); //setup background images.. if(backgroundImageWorkerThread == null){ backgroundImageWorkerThread = new BackgroundImageWorkerThread(); backgroundImageWorkerThread.start(); } //setup navigation bar... LinearLayout navBar = BT_viewUtilities.getNavBarForScreen(this, this.screenData); if(navBar != null){ baseView.addView(navBar); }
 
rossideas
Aspiring developer
Profile
Posts: 145
Reg: Jul 24, 2011
Albuquerque
1,450
like
07/17/12 03:55 PM (11 years ago)
Oh couple other things... you have to use the url option... image file name would never work for me and the url's I used were not in the BT-server files folder under applications. I could not get that to work. Mine are just in a folder at the root. Hope this helps... Ross
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/17/12 06:44 PM (11 years ago)
Thanks ... I'll give it a go and report back. I don't believe we should be storing images/files directly in the application directory inside the BT server files. They just need to be publicly accessible files via the Internet. I know a lot of people here use files shared on dropbox. I just set up a directory for each app not inside the BT server panel that I can use for images, php scripts, rss feeds for android etc. So my setup sounds similar to yours.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/17/12 07:06 PM (11 years ago)
@rossideas Great it all works!!! BTW Background images 'do' work on the device for me - no need for a url. Just make sure they are placed inside /res/drawable in your project.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
07/18/12 07:05 AM (11 years ago)
Ross, are you developing on a MAC as well? The local image works for me as well in that same folder. Eclipse seems to like when I import into the project outside the program too. And lots of clean and builds seem to help. I think we all have the BTM Advanced menu on our servers and using Macs. I'd be interested to hear if anyone is able to compile a 2.0 Self Hosted on Windows Platform with that plug-in in the mix - even if it's not in use? All the folks that seem to be in this position use MAC except one, but I don't know if he has the menu in the mix. Either way, the fact it doesn't work has made me dig a littler deeper here and tinker with different design concepts for Android. If i can figure out how to move the list down/up on the screen and change the row sizes, I can live with background images for now. I don't use a header tap function for the header image anyways. I like the idea of having completely seperate apps - one Androind one iOS even if it is the same app/same client. Seems like trying to make a single universal app on 2.0 would be almost impossible given the differences between the 2 platforms... now back to hacking up the menuListSimple.java file...
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
07/20/12 08:09 AM (11 years ago)
Think I found a fix in the BT_screen_html_Doc.java that is similar to Ross's find- I've been packaging a bunch of HTML docs in my Android 2.0 Self Hosted APP. Using the HTML Doc plug-in. I noticed when I ran them in the emulator I was only seeing the top 1/3 of the document. I tested a bunch of different html files to see if it was my source but every single one looked the same. I could tell that the whole doc is there because you can scroll it and I spotted some text on the way bottom. I ttested each function in the CP for Document behavior with no sucess. So I opened up the BT_screen_html_Doc.java file and starting hacking away- The code just above the *same* statement Ross modified in the menuListSimple.java also exists in this file. if you comment out this line below //setup background images.. BT_viewUtilities.updateBackgroundColorsForScreen(this. this.screenData); Now your HTML Docs will display full screen they way you expect. Now to fix the blank map tiles in this app...
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/20/12 09:35 PM (11 years ago)
@ATRAIN53 Great work again ... the more bugs we can get out of the Android plugins the better :) If you are having map tile issues see this doc. It has a small section on it. http://www.buzztouch.com/files/howtos/Common_Android_Errors_and_Solutions_v1.0.pdf
 
rossideas
Aspiring developer
Profile
Posts: 145
Reg: Jul 24, 2011
Albuquerque
1,450
like
07/20/12 09:51 PM (11 years ago)
atrain53... yes on the Mac! Good find on the BT_screen_html_Doc.java! ictguy... thanks for the heads up on the images in the /res/drawable. I've been spoiled by ios. I have an old Droid I'm testing with but only with WiFi. The app I'm working on is all streaming video. I'm curious how bad the videos (mobile versions via Vimeo Pro) will stall using 3G or 4G. How do I ask someone that might have an Android cell phone w/3G or 4G to test my app for me. Do either of you know? ... thanks
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/20/12 11:43 PM (11 years ago)
rossideas, sorry I can't help with Android devices and 3g but I'm sure if you put a request into the general forum someone would take a look for you. I'm interested in how you are using the vimeo pro .. you can't launch native app like youtube player AFAIK, so are you just linking to the files and streaming them or do they have a HTML player that works nicely, or is it via an RSS feed ... ? TIA
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
07/21/12 07:13 AM (11 years ago)
Got the map tiles fixed. You really have to nuke that debug key line from the androidmanifest and put it in the strings file as well. Having the 'debug' line in the manifest is the 'bug'. Ross - Unlike iOS you can load multiple video players on Android devices. Some players work better with caching. So users may be presented with a list of players to choose from whent he stream connects. Lots of factors will affect the speed. I use MOBO player on my device. You could 'recommend people install it' in your app for 'best experience'. https://play.google.com/store/apps/details?id=com.clov4r.android.nil&hl=en also unlike iOS, Android testing on real devices is much easier. just build an .apk file and put it in a dropbox public folder and send the link to a tester. anyone can install that .apk as ling as they have the 'install non market' preference set. I'd do it but my droid is on pay-per-go. my experiences with streaming vid on 4g say it plays pretty well. i see it stall out/lag on folks on the train druring rush hour. The way data plans work these days - you might find users prefer to wait until they are on wi-fi to watch it.
 
rossideas
Aspiring developer
Profile
Posts: 145
Reg: Jul 24, 2011
Albuquerque
1,450
like
07/21/12 08:18 AM (11 years ago)
I am using the A/V simple plugin that brings along its own player. It seems to get the job done 95% of the time, but even it hangs every now and then, using WiFi. I don't want to rely on the user knowing, downloading, or doing anything for my app to work (if possible). I'm trying to avoid that post-sale headache/refund (haha). I've been dealing with video/formats/bandwidth since 2005... it is slowly getting better. ictguy - All my videos are set to private at Vimeo. For my websites, I let Vimeo serve up what the Browser needs. For example, FireFox won't play mp4, so Vimeo detects and serves up ogv. Also, Vimeo allows me to restrict which domains can access my videos (nice feature). Now for mobile, I stream a particular file (mp4) to the device. There are 4 quality options (very cool), but too confusing for the user to determine which video option will function on their device, based on their available bandwidth (at the time)... so I only use the lowest quality to prevent more headaches. Vimeo Pro is $200 year with a 250K play limit (not cool).
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
07/21/12 08:16 PM (11 years ago)
Thanks rossideas, I use vimeo pro as well (not for mobile projects yet) and was just wondering about the setup. Thanks for sharing!
 

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.