chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
12/03/12 08:53 AM (13 years ago)

Android apps running much slower than iOS apps

Does anyone else have this problem? My Android apps (3 now) are running much slower than they're iOS counterparts. Is there anything that can be done to diagnose/speed them up? Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/03/12 10:18 AM (13 years ago)
As in the device is slow or the control panel is slow? The control panel isn't any different. Devices are very very different. I'm working with a Nexus 7 tablet this morning and it's a slow dog! LOL
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/03/12 10:24 AM (13 years ago)
Devices are running the apps slow. It seems to be device-independent, though, as different people with different devices are having the issue. One person has a new Samsung Galaxy III-S and noticed the sluggishness of the apps right away.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/03/12 11:48 AM (13 years ago)
That sounds lame. Hmmm... Not sure what it could be without knowing a bunch about what's running, etc, etc. I guess the place to start, as with anything, is with some tests. I would ask myself: --How many different things are going on with this app at the same time? Audio, images, graphics, etc, etc. --Does one screen seem to be performing slow and not others or is it something related to the entire process? Hmm.. --Is there some sort of background process that's taking up a ton of memory? Shouldn't be but could be I guess? Location Services (if enabled) can get taxing but should only run for a few seconds? These are some basics ideas of course. Really it's a matter of figuring out what "slow" means and going from there. When it comes to managing memory, Images, Video, and Audio are hogs but Android does seem to handle this pretty well. Not sure how to advise?
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 03:33 PM (13 years ago)
Im having the same problem with Android. Im stuck because my app is so slow (on numerous types of android devices) that i dont know what to do now. My larger images are all on the APK itself. I have GPS off on core settings. Worst lag is when you press the "Home" button on the nav bars...takes 10-14 seconds to actually bring the home page up.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/05/12 03:44 PM (13 years ago)
After doing some initial testing, it looks like my issue might have to do with the loading of images. On the Android versions, I had to load most of my images from a url because I was getting memory errors when they were loaded directly from the app. I need to go back and test that further, though, to see if that's really the issue.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/05/12 03:45 PM (13 years ago)
@Aaron636r - what type of screen/plugin are you using for your "Home" screen?
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 03:46 PM (13 years ago)
All mine are loaded in the app. So no idea how to fix mine.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 04:12 PM (13 years ago)
Menu with image
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/05/12 04:12 PM (13 years ago)
Good info about images on Android. It could that that the home screens plugin isn't handling memory efficiently, which we should look into. What kind of plugin is it? But, none of you're images should be "huge" in file size.. are we asking android to load tons of 500 x 500 images for little buttons? LOL
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/05/12 04:15 PM (13 years ago)
I'm using the Menu with Image plugin as well. My icons are all 100x100 (about a half-dozen on each menu screen). My header images are larger of course, but there's only one of those per plugin screen and only 2 in the entire app.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 04:16 PM (13 years ago)
I have 1 header image thats 279kb (loaded into app). Than another one that's only 2.39KB (also loaded in app). Thats it. Im using the plugin (purchased) "Menu with Image" from your plugin store David. https://www.buzztouch.com/plugins/plugin.php?pid=F018606BDA6027B90A3ED49
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/05/12 04:17 PM (13 years ago)
Looks like we posted at same time -:) Tons if these button screens around without any trouble. I wonder if Android 4.0.whatever (newest) is running the "onCreate" method on every screen load, including "back" presses. If it is, and its using a bunch of images, it would make sense that it would be slow. But, 15 seconds is not gonna work. Sounds lame.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 04:19 PM (13 years ago)
I will play with a few things and report back. Thanks David and Chris
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 04:19 PM (13 years ago)
Edit: Why do i keep double posting. Odd...sorry
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/05/12 04:20 PM (13 years ago)
Good info. Header image is likely culprit. I'll contact developer and see what we can figure out.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/05/12 04:24 PM (13 years ago)
Looks like my header images are in .png format, have 1555x720 dimensions, and are around 730kb each. I just crashed one of my apps in the Eclipse simulator trying to load one of the header images (from a url). When I get some more time, I'm going to try and reduce the quality of the images to see if that resolves the issue. Here's the logcat output of the crash: 12-05 17:14:34.333: W/ZZ(306): BT_fileManager:deleteFile videosermons1_screenData.txt does not exist 12-05 17:14:34.343: W/ZZ(306): WB_screen_menuImage: header image exists in resources folder: "http://www.churchphoneapps.com/images/worship.png" 12-05 17:14:34.424: E/dalvikvm-heap(306): 10078560-byte external allocation too large for this process. 12-05 17:14:34.424: E/GraphicsJNI(306): VM won't let us allocate 10078560 bytes 12-05 17:14:34.424: D/AndroidRuntime(306): Shutting down VM 12-05 17:14:34.424: W/dalvikvm(306): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 12-05 17:14:34.463: E/AndroidRuntime(306): FATAL EXCEPTION: main 12-05 17:14:34.463: E/AndroidRuntime(306): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 12-05 17:14:34.463: E/AndroidRuntime(306): at android.graphics.Bitmap.nativeCreate(Native Method) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.content.res.Resources.loadDrawable(Resources.java:1709) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.content.res.Resources.getDrawable(Resources.java:581) 12-05 17:14:34.463: E/AndroidRuntime(306): at com.allsaints.BT_fileManager.getDrawableByName(BT_fileManager.java:263) 12-05 17:14:34.463: E/AndroidRuntime(306): at com.allsaints.WB_screen_menuImage.onCreate(WB_screen_menuImage.java:221) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.os.Handler.dispatchMessage(Handler.java:99) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.os.Looper.loop(Looper.java:123) 12-05 17:14:34.463: E/AndroidRuntime(306): at android.app.ActivityThread.main(ActivityThread.java:4627) 12-05 17:14:34.463: E/AndroidRuntime(306): at java.lang.reflect.Method.invokeNative(Native Method) 12-05 17:14:34.463: E/AndroidRuntime(306): at java.lang.reflect.Method.invoke(Method.java:521) 12-05 17:14:34.463: E/AndroidRuntime(306): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 12-05 17:14:34.463: E/AndroidRuntime(306): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 12-05 17:14:34.463: E/AndroidRuntime(306): at dalvik.system.NativeStart.main(Native Method) 12-05 17:14:36.844: I/Process(306): Sending signal. PID: 306 SIG: 9
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/05/12 04:41 PM (13 years ago)
I will take a look at it tonight. Your timing is excellent. Just yesterday I just upgraded from the Galaxy II to the Galaxy III so I would have a more current device for testing. My experience so far is that the lower level devices work better on my Android apps, which is strange because you would think the newer devices would be better. That is the primary reason why I wanted to upgrade to the Galaxy III.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 04:59 PM (13 years ago)
@SusanMetoxen thank you very much for looking into this
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/05/12 05:20 PM (13 years ago)
Thanks Susan! Will be interested to see what you find. I'll continue to work on it myself as well.
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/05/12 09:53 PM (13 years ago)
I'm afraid no quick resolution. I played with it this evening and saw some problems. I may need a bigger app to really test it better. Now I have three devices for testing, so can get a better picture. 1. Galaxy Player 2.3.3--it always works perfectly 2. Galaxy II upgraded to 4.0.4. The icon images do not appear and I have this error: BT_fileManager: An exception occurred trying to get an image from a URL 3. Galaxy SIII 4.1.1 -- seems to work ok, but the images need to be adjusted for the higher resolution device. I will keep working with it tomorrow. Thank you for your patience!
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 10:06 PM (13 years ago)
Feel free to test my current project. Its not complete but uses the plugin. http://db.tt/eJb88crW
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/05/12 10:17 PM (13 years ago)
That will help a lot! My testing project isn't very large. Thank you!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/05/12 11:15 PM (13 years ago)
@SusanMetoxen, good tests. Others, good info. This for sure is part of the issue: java.lang.OutOfMemoryError That 1500 x 700 image @chris1 is loading is for sure a killer on a small gadget. This doesn't mean it should crash though. But, for sure we'll want to work in some logic that re-sizes (not dimensions, but file size) the bitmap after it downloads. And, it should only download from the URL once. Either way there are a few improvement that we'll get worked in. What we're finding with some of these newer releases of Android is that each screen is running onDestroy() every time it is pushed to the backend. The next screen runs onCreate() then pressing back requires the previous screen to once again run onCreate() because it was destroyed immediately. This is a change in Android's behavior. Older released didn't destroy the previous Activity so quickly and therefore didn't need to 100% re-build themselves when going back. Blah, blah, nerdy details. If you're like us, you love this sorta mystery and challenge and each discovery and problem and fix ultimately turns into a better screen that's more efficient and more reliable moving forward. I've already begun looking into way to add some efficiencies to the screen and will report my findings to this thread. I'm headed to San Diego tomorrow and don't know when I'll get it "done" but do hope to have some answers before I leave. Open Source Rocks!!!
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/05/12 11:31 PM (13 years ago)
Thank you very much for working on this.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/06/12 09:49 AM (13 years ago)
I think your right David. I am by far a noob when it comes to coding. But doing some research the onDestroy is the issue. Of coarse im clueless on how to fix it :)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/06/12 10:34 AM (13 years ago)
Glad to hear about the progress already! Thanks @David and @SusanMetoxen !!
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/06/12 07:19 PM (13 years ago)
It isn't a solution...still working on that...but I did load @Aaron636r's app on the Galaxy Player and the Galaxy III. It worked BETTER on the Galaxy III, but crashed after I played with it for about 5 minutes. The Galaxy Player never crashed, but was extremely, extremely slow. I would touch a button, and nothing would happen for like 3 seconds. I haven't had that experience with my apps. In the app the next layer down on are HTML docs or Custom URLs, right? Anyway it didn't seem more responsive past the Menu with Image screen. I will keep working on it--David gave me some ideas last night. @Aaron636r: I am working on a plugin that may help your app--it is something that I started for @Chris1 and now I am taking further. It is the Custom URL with improved navigation options. It would give your users a choice between going back one screen or back to the menu. I have it pretty much done for iOS with the control panel and everything, but still need to do the Android. I think your app is very classy! Your client will love it.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/06/12 07:24 PM (13 years ago)
Awesome!!! Looking forward to too it. Appreciate your help Susan
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/08/12 08:16 AM (13 years ago)
A quick update....no resolution yet, but want you to know I am still working on it. David is working on it as well. It seems like the problem started when we added the row icons....this plugin has been out there since the beginning and this problem seems to be coming up since we added more functionality in the second version. I'm not sure if it the icons themselves or the quantity of images that the devices have to handle. It does seem to improve the performance if you make the images smaller, but that isn't a satisfactory solution for the newer high res devices. More to come.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/08/12 08:17 AM (13 years ago)
Thank you
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/12/12 06:57 PM (13 years ago)
I am afraid I am still working on this. A couple other buzztouch developers have apps they are actively working on and have been very helpful. The key seems to be reducing the file size of the images. Here is a website where you can reduce image file sizes at no cost without a perceptible loss in quality. http://tinypng.org I am still working on a better solution, but I hope that this will keep your apps moving along in the meantime. A smaller file size is a better use of resources for your app users anyway. The plugin seems to work until you add icons to it. I am not sure if it is the icons themselves, or just the total amount of resources to handle the extra images. I will keep posting updates here until the new version is ready.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/12/12 07:04 PM (13 years ago)
I'll try your suggestions. Thank you for working on this
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/12/12 09:12 PM (13 years ago)
Susan, I just tried loading the images natively after shrinking the header images using the site you suggested (it shrunk them to around 200kb each). I tried shrinking the icons, but Eclipse gave me errors on all of them and wouldn't run the app. After including the shrunken header images and regular icon images (which are 50-100k each), the app crashes consistently. Here's the logcat output from selecting the menu screen until the crash: --------------LogCat Output------------------------ 12-12 22:07:14.965: I/global(415): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 12-12 22:07:15.765: W/ZZ(415): WB_screen_menuImage:handleReportToCloudResults appLastModifiedOnServer (value on server): Sat, 1 Dec 2012 06:21:15 -0700 12-12 22:07:15.765: W/ZZ(415): BT_fileManager: readTextFileFromCache: "appModified.txt" 12-12 22:07:15.885: W/ZZ(415): WB_screen_menuImage:handleReportToCloudResults previousModified (value on device): {this is a pretend date} 12-12 22:07:15.885: W/ZZ(415): BT_fileManager: saveTextFileToCache: appModified.txt 12-12 22:07:15.956: W/ZZ(415): WB_screen_menuImage:handleReportToCloudResults server data changed, app needs refreshed 12-12 22:07:19.565: W/ZZ(415): WB_screen_menuImage:onPause (BASE CLASS) 12-12 22:07:19.565: W/ZZ(415): BT_activity_base:onCreate (BASE CLASS) 12-12 22:07:19.585: W/ZZ(415): WB_screen_menuImage:onCreate 12-12 22:07:19.585: W/ZZ(415): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "WorshipMenu" 12-12 22:07:19.585: W/ZZ(415): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: "#666666" 12-12 22:07:19.595: W/ZZ(415): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: "WorshipMenu" 12-12 22:07:19.605: W/ZZ(415): BT_strings:getSaveAsFileNameFromURL from: "http://www.churchphoneapps.com/images/greybg.png" file name: "greybg.png" 12-12 22:07:19.615: W/ZZ(415): BT_downloader:downloadDrawable from URL: http://www.churchphoneapps.com/images/greybg.png 12-12 22:07:19.626: W/ZZ(415): BT_viewUtilities:getNavBarForScreen Hiding nav. bar for screen with nickname: "WorshipMenu" 12-12 22:07:19.626: W/ZZ(415): BT_fileManager:deleteFile WorshipMenu1_screenData.txt 12-12 22:07:19.635: W/ZZ(415): BT_fileManager:deleteFile WorshipMenu1_screenData.txt does not exist 12-12 22:07:19.645: W/ZZ(415): WB_screen_menuImage: header image exists in resources folder: "worshipsm.png" 12-12 22:07:19.765: W/ZZ(415): BT_downloader:downloadImage HTTP response NOT OK, URL: http://www.churchphoneapps.com/images/greybg.png 12-12 22:07:19.815: E/dalvikvm-heap(415): 10078560-byte external allocation too large for this process. 12-12 22:07:19.815: E/GraphicsJNI(415): VM won't let us allocate 10078560 bytes 12-12 22:07:19.824: D/AndroidRuntime(415): Shutting down VM 12-12 22:07:19.824: W/dalvikvm(415): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 12-12 22:07:19.845: E/AndroidRuntime(415): FATAL EXCEPTION: main 12-12 22:07:19.845: E/AndroidRuntime(415): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 12-12 22:07:19.845: E/AndroidRuntime(415): at android.graphics.Bitmap.nativeCreate(Native Method) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.content.res.Resources.loadDrawable(Resources.java:1709) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.content.res.Resources.getDrawable(Resources.java:581) 12-12 22:07:19.845: E/AndroidRuntime(415): at com.fumcvinita.BT_fileManager.getDrawableByName(BT_fileManager.java:263) 12-12 22:07:19.845: E/AndroidRuntime(415): at com.fumcvinita.WB_screen_menuImage.onCreate(WB_screen_menuImage.java:221) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:651) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.widget.TabHost.setCurrentTab(TabHost.java:323) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:129) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:453) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.view.View.performClick(View.java:2408) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.view.View$PerformClick.run(View.java:8816) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.os.Handler.handleCallback(Handler.java:587) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.os.Handler.dispatchMessage(Handler.java:92) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.os.Looper.loop(Looper.java:123) 12-12 22:07:19.845: E/AndroidRuntime(415): at android.app.ActivityThread.main(ActivityThread.java:4627) 12-12 22:07:19.845: E/AndroidRuntime(415): at java.lang.reflect.Method.invokeNative(Native Method) 12-12 22:07:19.845: E/AndroidRuntime(415): at java.lang.reflect.Method.invoke(Method.java:521) 12-12 22:07:19.845: E/AndroidRuntime(415): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 12-12 22:07:19.845: E/AndroidRuntime(415): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 12-12 22:07:19.845: E/AndroidRuntime(415): at dalvik.system.NativeStart.main(Native Method) 12-12 22:07:22.155: I/Process(415): Sending signal. PID: 415 SIG: 9
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/12/12 09:22 PM (13 years ago)
I tried to shrink the background image ("greybg.png") and load it natively, but got the same result. Only this time the error about "VM won't let us allocate..." was a much smaller number: -----------------LogCat Output------------------- 12-12 22:19:47.745: I/global(456): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 12-12 22:19:47.755: W/ZZ(456): WB_screen_menuImage:handleReportToCloudResults appLastModifiedOnServer (value on server): Sat, 1 Dec 2012 06:21:15 -0700 12-12 22:19:47.755: W/ZZ(456): BT_fileManager: readTextFileFromCache: "appModified.txt" 12-12 22:19:47.755: W/ZZ(456): WB_screen_menuImage:handleReportToCloudResults previousModified (value on device): {this is a pretend date} 12-12 22:19:47.755: W/ZZ(456): BT_fileManager: saveTextFileToCache: appModified.txt 12-12 22:19:47.775: W/ZZ(456): WB_screen_menuImage:handleReportToCloudResults server data changed, app needs refreshed 12-12 22:19:51.595: W/ZZ(456): WB_screen_menuImage:onPause (BASE CLASS) 12-12 22:19:51.595: W/ZZ(456): BT_activity_base:onCreate (BASE CLASS) 12-12 22:19:51.615: W/ZZ(456): WB_screen_menuImage:onCreate 12-12 22:19:51.615: W/ZZ(456): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "WorshipMenu" 12-12 22:19:51.615: W/ZZ(456): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: "#666666" 12-12 22:19:51.625: W/ZZ(456): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: "WorshipMenu" 12-12 22:19:51.635: W/ZZ(456): BT_viewUtilities:getNavBarForScreen Hiding nav. bar for screen with nickname: "WorshipMenu" 12-12 22:19:51.645: W/ZZ(456): WB_screen_menuImage:backgroundWorkerThread using image from project bundle: "greybg.png" 12-12 22:19:51.645: D/skia(456): ---- copyAsset: asset->getLength() returned 0 12-12 22:19:51.645: W/ZZ(456): BT_fileManager:deleteFile WorshipMenu1_screenData.txt 12-12 22:19:51.645: W/ZZ(456): BT_fileManager:deleteFile WorshipMenu1_screenData.txt does not exist 12-12 22:19:51.655: W/ZZ(456): WB_screen_menuImage: header image exists in resources folder: "worshipsm.png" 12-12 22:19:51.915: D/dalvikvm(456): GC_EXTERNAL_ALLOC freed 2641 objects / 211536 bytes in 60ms 12-12 22:19:53.054: W/ZZ(456): WB_screen_menuImage:setHeaderDrawble 12-12 22:19:53.054: W/ZZ(456): WB_screen_menuImage:onStart (BASE CLASS) 12-12 22:19:53.065: W/ZZ(456): WB_screen_menuImage: start GPS is set to NO in the applications configuration data, not starting GPS 12-12 22:19:53.065: W/ZZ(456): WB_screen_menuImage:onStart using data from app's configuration file 12-12 22:19:53.065: W/ZZ(456): WB_screen_menuImage:parseScreenData 12-12 22:19:53.065: W/ZZ(456): WB_screen_menuImage:onResume (BASE CLASS) 12-12 22:19:53.094: E/dalvikvm-heap(456): 90000-byte external allocation too large for this process. 12-12 22:19:53.094: E/GraphicsJNI(456): VM won't let us allocate 90000 bytes 12-12 22:19:53.094: D/AndroidRuntime(456): Shutting down VM 12-12 22:19:53.094: W/dalvikvm(456): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 12-12 22:19:53.140: E/AndroidRuntime(456): FATAL EXCEPTION: main 12-12 22:19:53.140: E/AndroidRuntime(456): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 12-12 22:19:53.140: E/AndroidRuntime(456): at android.graphics.Bitmap.nativeCreate(Native Method) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.content.res.Resources.loadDrawable(Resources.java:1709) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.content.res.Resources.getDrawable(Resources.java:581) 12-12 22:19:53.140: E/AndroidRuntime(456): at com.fumcvinita.BT_fileManager.getDrawableByName(BT_fileManager.java:263) 12-12 22:19:53.140: E/AndroidRuntime(456): at com.fumcvinita.WB_screen_menuImage$ChildItemAdapter.getView(WB_screen_menuImage.java:671) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.AbsListView.obtainView(AbsListView.java:1315) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.ListView.measureHeightOfChildren(ListView.java:1198) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.ListView.onMeasure(ListView.java:1109) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.RelativeLayout.measureChild(RelativeLayout.java:563) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:378) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.LinearLayout.measureVertical(LinearLayout.java:381) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.View.measure(View.java:8171) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewRoot.performTraversals(ViewRoot.java:801) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.os.Handler.dispatchMessage(Handler.java:99) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.os.Looper.loop(Looper.java:123) 12-12 22:19:53.140: E/AndroidRuntime(456): at android.app.ActivityThread.main(ActivityThread.java:4627) 12-12 22:19:53.140: E/AndroidRuntime(456): at java.lang.reflect.Method.invokeNative(Native Method) 12-12 22:19:53.140: E/AndroidRuntime(456): at java.lang.reflect.Method.invoke(Method.java:521) 12-12 22:19:53.140: E/AndroidRuntime(456): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 12-12 22:19:53.140: E/AndroidRuntime(456): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 12-12 22:19:53.140: E/AndroidRuntime(456): at dalvik.system.NativeStart.main(Native Method) 12-12 22:19:55.755: I/Process(456): Sending signal. PID: 456 SIG: 9
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/12/12 09:52 PM (13 years ago)
@chris1: Good info here. Is this in the emulator or the device? Just wondering. The image at the url for the greybg.png loads an image in my browser that is 365 KB. I downloaded it, opened in in a photo edtor and exported it as a PNG-8 file. It's now 33 KB. More than 10 times smaller. I don't know what's happening with your device other than it's clearly running out of memory. I know @SusanMetoxen has been looking into making some improvements to the menu plugin but in this case this is a background image issue, not a menu issue. There may be some ways to use Android Bitmap's class to "shrink" the file size of background images to speed things up a bit. But, the image will need to be downloaded before this is possible and if you're device isn't capable of downloading such an image I'm not sure what the best solution is. Hmmm.. I'll bet this is an emulator. Just a hunch. If it is, you can increase the Heap Size in the emulators settings to try to mirror an actual device?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/12/12 10:01 PM (13 years ago)
@David - it's the emulator. I'll work on it tomorrow and see what I can find out. Thanks for the tip about the PNG-8 option. Is that first line of logcat: 12-12 22:19:47.745: I/global(456): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. anything that is to be concerned about?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/12/12 10:08 PM (13 years ago)
Not to be concerned about but for SURE could be part of this? It could be that configuring the BufferedReader (the object that does the downloading) with a different size buffer could help with this (and other) download issues. I remember tinkering with that in the past so I'm not 100% sure on this idea, just a thought. I'll try to get some tests done with different buffer sizes and see what happens. I know a URL tto use for a background image :-)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/13/12 10:51 AM (13 years ago)
Okay - I tried downsizing the background image, still an error. So, I tried removing the background image altogether, and just going with a background color. Still an error: 12-13 11:48:53.881: I/global(342): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 12-13 11:48:54.131: W/ZZ(342): WB_screen_menuImage:handleReportToCloudResults appLastModifiedOnServer (value on server): Sat, 1 Dec 2012 06:21:15 -0700 12-13 11:48:54.131: W/ZZ(342): BT_fileManager: readTextFileFromCache: "appModified.txt" 12-13 11:48:54.141: W/ZZ(342): WB_screen_menuImage:handleReportToCloudResults previousModified (value on device): Sat, 1 Dec 2012 06:21:15 -0700 12-13 11:48:54.141: W/ZZ(342): BT_fileManager: saveTextFileToCache: appModified.txt 12-13 11:48:54.151: W/ZZ(342): WB_screen_menuImage:handleReportToCloudResults server data not changed, no refresh needed 12-13 11:48:58.881: W/ZZ(342): WB_screen_menuImage:onPause (BASE CLASS) 12-13 11:48:58.881: W/ZZ(342): BT_activity_base:onCreate (BASE CLASS) 12-13 11:48:58.901: W/ZZ(342): WB_screen_menuImage:onCreate 12-13 11:48:58.901: W/ZZ(342): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "WorshipMenu" 12-13 11:48:58.901: W/ZZ(342): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: "#666666" 12-13 11:48:58.901: W/ZZ(342): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: "WorshipMenu" 12-13 11:48:58.921: W/ZZ(342): WB_screen_menuImage:backgroundWorkerThread this screen does not use a background image 12-13 11:48:58.931: W/ZZ(342): BT_viewUtilities:getNavBarForScreen Hiding nav. bar for screen with nickname: "WorshipMenu" 12-13 11:48:58.931: W/ZZ(342): BT_fileManager:deleteFile WorshipMenu1_screenData.txt 12-13 11:48:58.941: W/ZZ(342): BT_fileManager:deleteFile WorshipMenu1_screenData.txt does not exist 12-13 11:48:58.952: W/ZZ(342): WB_screen_menuImage: header image exists in resources folder: "worshipsm.png" 12-13 11:48:59.160: D/dalvikvm(342): GC_EXTERNAL_ALLOC freed 2224 objects / 180656 bytes in 64ms 12-13 11:48:59.741: W/ZZ(342): WB_screen_menuImage:setHeaderDrawble 12-13 11:48:59.741: W/ZZ(342): WB_screen_menuImage:onStart (BASE CLASS) 12-13 11:48:59.751: W/ZZ(342): WB_screen_menuImage: start GPS is set to NO in the applications configuration data, not starting GPS 12-13 11:48:59.751: W/ZZ(342): WB_screen_menuImage:onStart using data from app's configuration file 12-13 11:48:59.751: W/ZZ(342): WB_screen_menuImage:parseScreenData 12-13 11:48:59.751: W/ZZ(342): WB_screen_menuImage:onResume (BASE CLASS) 12-13 11:48:59.781: E/dalvikvm-heap(342): 90000-byte external allocation too large for this process. 12-13 11:48:59.781: E/GraphicsJNI(342): VM won't let us allocate 90000 bytes 12-13 11:48:59.781: D/AndroidRuntime(342): Shutting down VM 12-13 11:48:59.791: W/dalvikvm(342): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 12-13 11:48:59.821: E/AndroidRuntime(342): FATAL EXCEPTION: main 12-13 11:48:59.821: E/AndroidRuntime(342): java.lang.OutOfMemoryError: bitmap size exceeds VM budget 12-13 11:48:59.821: E/AndroidRuntime(342): at android.graphics.Bitmap.nativeCreate(Native Method) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.graphics.Bitmap.createBitmap(Bitmap.java:468) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.graphics.Bitmap.createBitmap(Bitmap.java:435) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.content.res.Resources.loadDrawable(Resources.java:1709) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.content.res.Resources.getDrawable(Resources.java:581) 12-13 11:48:59.821: E/AndroidRuntime(342): at com.fumcvinita.BT_fileManager.getDrawableByName(BT_fileManager.java:263) 12-13 11:48:59.821: E/AndroidRuntime(342): at com.fumcvinita.WB_screen_menuImage$ChildItemAdapter.getView(WB_screen_menuImage.java:671) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.AbsListView.obtainView(AbsListView.java:1315) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.ListView.measureHeightOfChildren(ListView.java:1198) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.ListView.onMeasure(ListView.java:1109) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.RelativeLayout.measureChild(RelativeLayout.java:563) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:378) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.LinearLayout.measureVertical(LinearLayout.java:381) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.View.measure(View.java:8171) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewRoot.performTraversals(ViewRoot.java:801) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.os.Handler.dispatchMessage(Handler.java:99) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.os.Looper.loop(Looper.java:123) 12-13 11:48:59.821: E/AndroidRuntime(342): at android.app.ActivityThread.main(ActivityThread.java:4627) 12-13 11:48:59.821: E/AndroidRuntime(342): at java.lang.reflect.Method.invokeNative(Native Method) 12-13 11:48:59.821: E/AndroidRuntime(342): at java.lang.reflect.Method.invoke(Method.java:521) 12-13 11:48:59.821: E/AndroidRuntime(342): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 12-13 11:48:59.821: E/AndroidRuntime(342): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 12-13 11:48:59.821: E/AndroidRuntime(342): at dalvik.system.NativeStart.main(Native Method) 12-13 11:49:02.330: I/Process(342): Sending signal. PID: 342 SIG: 9
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/13/12 11:14 AM (13 years ago)
Chris, will you send me the apk file? I would like to try it on my devices. I have had very poor experiences with emulators and that will allow me to rule out that the problem isn't with emulator. Thanks!
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/13/12 11:20 AM (13 years ago)
I just emailed it to you Thanks!
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/13/12 11:53 AM (13 years ago)
It is very pretty, Chris! I tried it on the Galaxy Player (2.3) and the Galaxy III (4.1.1). It worked on both and did not crash. It was a bit jerky and slow, especially on the 2.3 device. On the Galaxy III, there is a problem with the text alignment--here is a link to how to modify the code until I get the new version out. https://www.buzztouch.com/plugins/discussion.php?tid=C79BA6736474E788E8E4A44&pid=F018606BDA6027B90A3ED49&searchInput=search...&sortColumn=PT.modifiedUTC&sortUpDown=DESC&currentPage=1
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/13/12 12:15 PM (13 years ago)
Thanks Susan - I'll work on modifying the code for the text issue later. Time to go do some pastoral visitations :)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/14/12 11:29 AM (13 years ago)
Okay - I reduced the size of the icon images to less than 10kb each. My emulator still crashes consistently, but it seems to run okay on my actual device. The emulator crash makes me nervous, though, since I only have one true Android device to test on.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/14/12 11:31 AM (13 years ago)
I have 6 devices Chris if youd like me to test.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/14/12 11:50 AM (13 years ago)
Thanks @Aaron636r. Here's the link to the signed apk. Just don't refresh the data, because the live version doesn't reflect the changes. Also, the "profile" tab doesn't seem to be working - I'm probably going to have to take that out for Android. https://dl.dropbox.com/s/3ws0wkfgvijulbg/FUMCVinita.BT_activity_root.1.1.apk?dl=1
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/14/12 12:03 PM (13 years ago)
Here is a screenshot of it installed on a Nexus 4 http://db.tt/0xtatxnB
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/14/12 12:04 PM (13 years ago)
Yeah - I haven't updated the code for the text formatting issue Susan mentioned above yet.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/14/12 12:39 PM (13 years ago)
Okay - I added in the new code for the text formatting - hopefully this looks better: https://dl.dropbox.com/s/6cvqj5oilbnnhzn/FUMCVinita.BT_activity_root.1.2.apk?dl=1
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/14/12 12:50 PM (13 years ago)
Nexus 4 screenshot http://db.tt/6mqYkuPQ
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/14/12 01:12 PM (13 years ago)
certainly looks better - any crashes when selecting the worship menu?
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/14/12 02:04 PM (13 years ago)
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/14/12 02:06 PM (13 years ago)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/14/12 02:08 PM (13 years ago)
Okay thanks - it looks like it's just an issue with my emulator then I guess. Thanks!
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/18/12 03:56 PM (13 years ago)
Hmm - looks like there's still some crashing issues even with the icons and headers reduced significantly in size and loaded locally. It mainly happens when a menu screen is loaded for the 3rd or 4th time. Is it possible that images aren't being cleared from memory fully each time the screen is exited? My icons are less than 10kb and my headers less than 250kb.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/18/12 03:58 PM (13 years ago)
I had to give up on icons on the menu. App works smoothly without them. Killed my "look" a little. But I have to get this app done.
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/18/12 05:46 PM (13 years ago)
I'm working on a complete rewrite so it will tolerate images better. I have heard from others that the problems went away when they made the image size smaller on tinypng.org. The draft I have now seems to work better on the newer devices. I should have it done soon, if all goes well. Keep in mind the older android devices still won't handle a lot of pictures well due to limitations of the device. Feel free to post a link to your apk files here....I can test them for you on the Galaxy 2 and Galaxy 3.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/20/12 09:13 AM (13 years ago)
Susan - glad to know an update is coming out soon. I'm still having major problems with crashing. I reduced the header images even further (one is less than 100kb and the other less than 150kb. On the emulator anyway, that improved things tremendously. I can switch back and forth between the menu screens now without any crashing. But, if I hit the home button and then click on the app icon again to bring it back up, it crashes without fail. I tried removing all icons to see if that did the trick, but the result is the same. Once I'm in the app, everything seems to be fine. But going to the Android desktop and then re-opening the app causes it to crash.
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/20/12 10:44 AM (13 years ago)
What device is it crashing on? I can test it on the Galaxy II and Galaxy III if you post the apk file. The performance on those two devices will give you good picture of how it will work in the real world. The apps with a lot of images may never work well on some older phones. My step-mother visited me yesterday and she had the Galaxy I phone! She got it just a few months ago--I am sure it was free with a service contract. I do have some new code ready to go, (thanks to David's help!) although I have a lot of work yet to release the updated plugin. Maybe we should see if the new code it works better for your project. What the old code does is this: For every row is it asks whether or not there is an icon and whether or not there is a description line, and then the code adjusts the formatting row by row based on whether or not there is a description line and an icon. You can see this is a lot of work for the program. (The iPhone can handle this approach, but not the Android.) What the new code will do is ask the buzztouch user in advance to select a row type in the control panel--Title Text only, Title and Description, Title and Icon, or Title + Description + Icon. Then the new code will send the app to an XML file that works for that row type selection. The new code eliminates all the checking for a description and icon, and also moves the layout from the java to the xml file. This is a significant change because it also affects the control panel. Because a new JSON element is required, I need to find a way that allows existing users who haven't added that JSON element in their control panel to automatically access the old version of the code. I also have more work to do on the control panel. This is important because I want the user to only see the fields that are appropriate to the row layout type they select. But if your project uses the same row layout type on every Menu with Image screen, (for example, every screen has an icon and description), then we could just direct the code to the appropriate XML fairly easily without the new JSON data element. Let me know if you are interested in trying this out. If you are interested, tell me your projects app delegate file name is so I can fix the code so you can just drag the new files into your project. Thanks!
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/20/12 10:50 AM (13 years ago)
I removed my menu images but left header images on multiple "pages". Working great on numerous devices.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/20/12 10:56 AM (13 years ago)
Thanks Susan. I'll try to post an apk before long for testing. I would like to try the new code out, too. My JSON is not through the control panel, so it will be easy to add a custom field. When I get some time I'll get you the necessary info. Chris
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/20/12 11:20 AM (13 years ago)
That is easier yet. If you can insert the new element into the JSON, then that would be a better test of the new code.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/20/12 09:24 PM (13 years ago)
Okay - I'm ready to give this a try. My project's app_delegate name is "fumcvinita_appDelegate.java". After I got home, I tried loading the project with the significantly reduced header images onto my cheap android test phone and only had it crash once after playing around with it for a while. Since that phone can crash on the normal browser on occasion, I call that a success. Still, I'd like to use the new code before sending out the next update. Once I incorporate that, I'll post a link to the apk so you can test it on your Galaxy devices. Thanks again! Chris
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/23/12 09:35 PM (13 years ago)
I am afraid I have a serious bug in the new version of the Android program. It affects the app whenever you have more rows than fit on a device without scrolling. I am still seeking a solution to that bug and will keep you posted on my progress. (This does not affect the current program.) In the meantime, I have heard from a few others that the problems are alleviated when you reduce your image size. I will keep you all posted on my progress. I apologize for the delay in solving this problem. If you post your apk files, I can test them for you on the Samsung Galaxy II and Galaxy III. In addition, I now have a Nexus 7 and I can test your apk files on that device as well.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/23/12 10:00 PM (13 years ago)
Thanks for the update Susan. I look forward to your future updates. Here's my apk with reduced image sizes. Could you please test it on your devices to see if it crashes? Previously, crashes were experienced when switching back and forth between the "Home" and "Worship" tabs, and when closing out of the app by hitting the "back" button from the main menu and then reloading the app using the icon. Hopefully the reduced image sizes have made the app much more stable. link to file: https://dl.dropbox.com/s/ygvahu352e2p7ul/FUMCVinita.BT_activity_root.1.4.apk?dl=1 Thanks, Chris
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/24/12 08:07 AM (13 years ago)
Tested on the following devices and didn't get any errors or FC's. Nexus 4 Motorola Defy (3yr old device) HTC Sensation Droid Droid 2
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/24/12 08:22 AM (13 years ago)
Thanks! I'll send the update to the store then.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
12/29/12 07:45 PM (13 years ago)
Just my two cents... When my images are using a URL, it loads excruciatingly slow. Several seconds. When my images are contained within my (Android, not iOS) App, it loads fine, no problems. My 'largest' images are typically about 25kb apiece. I use about 15 of them in this particular app. I don't notice this issue in iOS. I test in these environments: iOS Emulator iOS6, iPad iOS5.1.1, Samsung Galaxy Tab II v4.0.4, Android Emulator v2.2 No real problem for now; I planned on embedding the images anyway, and only use the URL for quick appearance checks. But figured if you're working on it, additional information may (or may not, heh) help. Cheers! -- Smug
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
12/30/12 11:58 AM (13 years ago)
I totally agree that if at all possible you should put your images in your project. I have one app with a button menu, and the client wanted one button to be changed. So I changed that one button to a URL. Whenever I open that app, all of the buttons appear instantaneously except for the button on a URL. A second later it fades in. David has helped me with a solution, and it seems to work a lot better. I have a different problem with it that is keeping me from finalizing it--if you scroll or select a child item and come back, it doesn't load the list correctly. Once I figure that out I will submit this all to buzztouch. My New Year's resolution is to conquer Android! With the new solution, even the images on a URL seem to load quickly. The new solution moves the layout from the java to the xml files and seems to be much more efficient at handling images. I may look at caching the icon images as well, but it may not need it.
 
Aaron636r
Aspiring developer
Profile
Posts: 246
Reg: Mar 08, 2011
California
3,160
like
12/30/12 12:01 PM (13 years ago)
Thanks Susan
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
01/11/13 07:56 PM (13 years ago)
Okay - so I just received an email from the client I was working with that had the crashing problems. Things were fine for a while - seemed to be much more reliable after I significantly reduced the size of the images. But now, the problem is back. She says every time she tries to open the app on her Galaxy IIIS it crashes. I checked my developer console and found the following crash report: java.lang.OutOfMemoryError at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:605) at android.graphics.Bitmap.createBitmap(Bitmap.java:551) at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:437) at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:618) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:593) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:445) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:775) at android.content.res.Resources.loadDrawable(Resources.java:1968) at android.content.res.Resources.getDrawable(Resources.java:677) at com.fumcvinita.BT_fileManager.getDrawableByName(BT_fileManager.java:263) at com.fumcvinita.WB_screen_menuImage.onCreate(WB_screen_menuImage.java:221) at android.app.Activity.performCreate(Activity.java:4470) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934) at android.app.ActivityThread.startActivityNow(ActivityThread.java:1811) at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135) at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347) at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:692) at android.widget.TabHost.setCurrentTab(TabHost.java:356) at android.widget.TabHost.addTab(TabHost.java:246) at com.fumcvinita.BT_activity_root_tabs$1.run(BT_activity_root_tabs.java:300) at android.os.Handler.handleCallback(Handler.java:605) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4517) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) at dalvik.system.NativeStart.main(Native Method)
 

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.