Discussion Forums  >  Buzztouch News and Announcements

Replies: 7    Views: 7651

tgnmpr
Code is Art
Profile
Posts: 5
Reg: Jul 09, 2012
Gainesville, FL
50
10/29/12 01:09 PM (13 years ago)

No Images for Android App in Eclipse Emulator

Hello Buzztouch. I need some of your infinite wisdom, and please forgive me if this has already been addressed, I just couldn't find a similar posting in my searches... I am working on an app for Android and when I Run>>Run As...>>Android Application and launch the app on the simulator none of my images that are a part of the application are showing up. Images linked via URL are showing, as is HTML content, and functionality appears normal, but no images that are "Image File Names." This includes page backgrounds, the splash page and buttons. I am showing no errors, have the proper SDK, and have created a "BT_Images" folder and stored all of the images in there (I also tried storing the images in the "BT_Docs" folder which didn't work either). UPDATE [8:48PM]: Here is the LogCat from when I run the Emulator... 10-29 20:44:58.086: W/ZZ(308): Creating gallerytheartoflife_appDelegate object. 10-29 20:44:58.086: W/ZZ(308): gallerytheartoflife_appDelegate:loadAudioPlayer 10-29 20:44:58.106: W/ZZ(308): BT_application: Creating root-app object. 10-29 20:44:58.106: W/ZZ(308): BT_device: Creating root-device object. 10-29 20:44:58.106: W/ZZ(308): BT_device: This device uses an Android display density of: 240dpi (dots per inch) 10-29 20:44:58.116: W/ZZ(308): BT_device: This device can take pictures. 10-29 20:44:58.116: W/ZZ(308): BT_device: This device can take videos. 10-29 20:44:58.116: W/ZZ(308): BT_device: This device can send emails. 10-29 20:44:58.126: W/ZZ(308): BT_device: This device is GPS capable. 10-29 20:44:58.136: W/ZZ(308): BT_user: Creating root-user object. 10-29 20:44:58.217: W/ZZ(308): BT_activity_root:onCreate 10-29 20:44:58.516: D/dalvikvm(308): GC_EXTERNAL_ALLOC freed 1454 objects / 99984 bytes in 67ms 10-29 20:44:58.587: W/ZZ(308): BT_activity_root:loadAppData 10-29 20:44:58.667: W/ZZ(308): BT_device:updateDeviceConnectionType: ConnectionType: CELL 10-29 20:44:58.667: W/ZZ(308): BT_device:updateDeviceSize This device has a screen size of: 480 (width) x 800 (height). 10-29 20:44:58.687: W/ZZ(308): BT_device:updateDeviceSize This application considers this to be a "small device" 10-29 20:44:58.687: W/ZZ(308): BT_device:updateDeviceSize This device is in "portrait" orientation. 10-29 20:44:58.696: W/ZZ(308): BT_activity_root:loadAppData loading BT_config.txt from /assests folder in Eclipse project... 10-29 20:44:59.056: W/ZZ(308): BT_fileManager: readTextFileFromAssets: "/BT_config.txt" 10-29 20:44:59.056: W/ZZ(308): BT_fileManager:readTextFileFromAssets: EXCEPTION reading text file from assets/BT_config.txt Error: java.io.FileNotFoundException: BT_config.txt 10-29 20:44:59.066: W/ZZ(308): BT_activity_root:loadAppData loaded BT_config.txt from /assets folder successfully... 10-29 20:44:59.066: W/ZZ(308): BT_activity_root:loadAppData ERROR loading BT_config.txt from the /assets folder? Existing app. 10-29 20:44:59.106: W/ZZ(308): BT_fileManager: readTextFileFromCache: "cachedAppConfig.txt" 10-29 20:44:59.316: W/ZZ(308): BT_activity_root:loadAppData reading cachedAppConfig.txt from the applications download cache... 10-29 20:44:59.346: W/ZZ(308): BT_activity_root:loadAppData ignoring BT_config.txt file in Eclipse project... 10-29 20:44:59.346: W/ZZ(308): BT_application: validateApplicationData 10-29 20:44:59.687: D/dalvikvm(308): GC_FOR_MALLOC freed 2080 objects / 330472 bytes in 75ms 10-29 20:44:59.707: W/ZZ(308): BT_activity_root: application data appears to be valid JSON... 10-29 20:44:59.767: W/ZZ(308): BT_application: parseJSONData 10-29 20:45:00.086: W/ZZ(308): BT_application: parsing core settings... 10-29 20:45:00.148: W/ZZ(308): BT_application: parsing themes... 10-29 20:45:00.148: W/ZZ(308): BT_application: parsing tabs... 10-29 20:45:00.148: W/ZZ(308): BT_application: parsing screens... 10-29 20:45:00.176: W/ZZ(308): gallerytheartoflife_appDelegate:SoundEffectLoader:doInBackground initSoundEffects 10-29 20:45:00.416: W/ZZ(308): BT_activity_root:transitionToAppHomeScreen 10-29 20:45:00.416: W/ZZ(308): BT_activity_root:transitionToAppHomeScreen splash screen with itemId: B81A75EAEA1B291D65B774C 10-29 20:45:00.446: W/ZZ(308): BT_application:getScreenDataByItemId B81A75EAEA1B291D65B774C 10-29 20:45:00.446: W/ZZ(308): BT_application:getScreenDataByItemId screenType is BT_screen_splash for screen with nickname: Gallery Splash Screen 10-29 20:45:00.677: W/ZZ(308): BT_screen_splash:onCreate 10-29 20:45:00.727: W/ZZ(308): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "Gallery Splash Screen" 10-29 20:45:00.727: W/ZZ(308): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: "#000000" 10-29 20:45:00.747: W/ZZ(308): BT_screen_splash: start GPS is set to NO in the applications configuration data, not starting GPS 10-29 20:45:01.668: E/WindowManager(308): Activity com.gallerytheartoflife.BT_activity_root has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44f48e58 that was originally added here 10-29 20:45:01.668: E/WindowManager(308): android.view.WindowLeaked: Activity com.gallerytheartoflife.BT_activity_root has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44f48e58 that was originally added here 10-29 20:45:01.668: E/WindowManager(308): at android.view.ViewRoot.<init>(ViewRoot.java:247) 10-29 20:45:01.668: E/WindowManager(308): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148) 10-29 20:45:01.668: E/WindowManager(308): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) 10-29 20:45:01.668: E/WindowManager(308): at android.view.Window$LocalWindowManager.addView(Window.java:424) 10-29 20:45:01.668: E/WindowManager(308): at android.app.Dialog.show(Dialog.java:241) 10-29 20:45:01.668: E/WindowManager(308): at com.gallerytheartoflife.BT_activity_root.showAlert(BT_activity_root.java:151) 10-29 20:45:01.668: E/WindowManager(308): at com.gallerytheartoflife.BT_activity_root$1.handleMessage(BT_activity_root.java:302) 10-29 20:45:01.668: E/WindowManager(308): at android.os.Handler.dispatchMessage(Handler.java:99) 10-29 20:45:01.668: E/WindowManager(308): at android.os.Looper.loop(Looper.java:123) 10-29 20:45:01.668: E/WindowManager(308): at android.app.ActivityThread.main(ActivityThread.java:4627) 10-29 20:45:01.668: E/WindowManager(308): at java.lang.reflect.Method.invokeNative(Native Method) 10-29 20:45:01.668: E/WindowManager(308): at java.lang.reflect.Method.invoke(Method.java:521) 10-29 20:45:01.668: E/WindowManager(308): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 10-29 20:45:01.668: E/WindowManager(308): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 10-29 20:45:01.668: E/WindowManager(308): at dalvik.system.NativeStart.main(Native Method) 10-29 20:45:01.807: W/ZZ(308): gallerytheartoflife_appDelegate:SoundEffectLoader:doInBackground initSoundEffects DISABLED 10-29 20:45:50.211: W/ZZ(308): BT_screen_splash:animateSplashScreen 10-29 20:45:50.236: W/ZZ(308): BT_application: findHomeScreen 10-29 20:45:50.236: W/ZZ(308): BT_act_controller:loadScreenObject for screen with nickname "Home" and type "BT_screen_menuButtons" 10-29 20:45:50.336: W/ZZ(308): BT_screen_menuList:onCreate 10-29 20:45:50.336: W/ZZ(308): BT_viewUtilities:updateBackgroundColorsForScreen with nickname: "Home" 10-29 20:45:50.336: W/ZZ(308): BT_viewUtilities:updateBackgroundColorsForScreen: setting background color to: "#ffffff" 10-29 20:45:50.346: W/ZZ(308): BT_viewUtilities:getNavBarForScreen building nav. bar for screen with nickname: "Home" 10-29 20:45:50.396: W/ZZ(308): BT_fileManager:deleteFile 2A149604AB8C6AC9FF1DD2C_screenData.txt 10-29 20:45:50.396: W/ZZ(308): BT_fileManager:deleteFile 2A149604AB8C6AC9FF1DD2C_screenData.txt does not exist 10-29 20:45:50.446: W/ZZ(308): BT_screen_menuList: start GPS is set to NO in the applications configuration data, not starting GPS 10-29 20:45:50.446: W/ZZ(308): BT_screen_menuList:onStart using data from app's configuration file 10-29 20:45:50.446: W/ZZ(308): BT_screen_menuList:parseScreenData 10-29 20:45:50.456: W/ZZ(308): BT_screen_menuList:layoutButtons 10-29 20:45:50.497: W/ZZ(308): BT_screen_menuList:reportToCloud 10-29 20:45:50.528: W/ZZ(308): BT_screen_menuList:reportToCloudWorkerThread getting lastModified from reportToCloudURL http://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=JA9B7B87025EF76521136B7EE&apiKey=99AC4F85E756F589DF32C26&apiSecret=869AB36403697A493AB6992&deviceId=&deviceLatitude=&deviceLongitude=&deviceModel=generic-google_sdk&userId= 10-29 20:45:50.528: W/ZZ(308): BT_downloader:downloadTextData from URL: http://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=JA9B7B87025EF76521136B7EE&apiKey=99AC4F85E756F589DF32C26&apiSecret=869AB36403697A493AB6992&deviceId=&deviceLatitude=&deviceLongitude=&deviceModel=generic-google_sdk&userId= 10-29 20:45:51.126: I/global(308): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 10-29 20:45:51.156: W/ZZ(308): BT_screen_menuList:handleReportToCloudResults appLastModifiedOnServer (value on server): Tue, 23 Oct 2012 17:51:55 -0700 10-29 20:45:51.156: W/ZZ(308): BT_fileManager: readTextFileFromCache: "appModified.txt" 10-29 20:45:51.156: W/ZZ(308): BT_screen_menuList:handleReportToCloudResults previousModified (value on device): Tue, 23 Oct 2012 17:51:55 -0700 10-29 20:45:51.156: W/ZZ(308): BT_fileManager: saveTextFileToCache: appModified.txt 10-29 20:45:51.186: W/ZZ(308): BT_screen_menuList:handleReportToCloudResults server data not changed, no refresh needed
 
tgnmpr
Code is Art
Profile
Posts: 5
Reg: Jul 09, 2012
Gainesville, FL
50
like
10/29/12 01:31 PM (13 years ago)
*Correction, I have the proper Google API (not SDK)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/29/12 11:33 PM (13 years ago)
Images for Android go into the res > drawable folder. If they are part of an HTML page, then they go in the BT_Docs folder along with the HTML. Don't forget to use the 0-9a-z naming scheme, which means all lower case, no spaces, no special characters! Mark
 
tgnmpr
Code is Art
Profile
Posts: 5
Reg: Jul 09, 2012
Gainesville, FL
50
like
10/30/12 08:54 AM (13 years ago)
Thank you for your reply. Since my original post I have reconfigured the app graphics to pull from URLs and I am still having the same problems. Any other suggestions?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/30/12 09:20 AM (13 years ago)
Can you provide some LogCat output from a point where you load a screen and expect images to show up? Also...can you access the images via a browser using the same link? Mark
 
tgnmpr
Code is Art
Profile
Posts: 5
Reg: Jul 09, 2012
Gainesville, FL
50
like
10/30/12 11:34 AM (13 years ago)
Yes. And yes. And some new developments... Here's some LogCat output... [2012-10-30 14:24:38 - com.gallerymagazine.BT_activity_root] New emulator found: emulator-5554 [2012-10-30 14:24:38 - com.gallerymagazine.BT_activity_root] Waiting for HOME ('android.process.acore') to be launched... [2012-10-30 14:25:53 - com.gallerymagazine.BT_activity_root] HOME is up on device 'emulator-5554' [2012-10-30 14:25:53 - com.gallerymagazine.BT_activity_root] Uploading com.gallerymagazine.BT_activity_root.apk onto device 'emulator-5554' [2012-10-30 14:25:54 - com.gallerymagazine.BT_activity_root] Installing com.gallerymagazine.BT_activity_root.apk... [2012-10-30 14:26:28 - com.gallerymagazine.BT_activity_root] Success! [2012-10-30 14:26:28 - com.gallerymagazine.BT_activity_root] Starting activity com.gallerymagazine.BT_activity_root on device emulator-5554 [2012-10-30 14:26:31 - com.gallerymagazine.BT_activity_root] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.gallerymagazine/.BT_activity_root } It is now showing the splash and home pages (though not consistently) and button images. When I try to navigate to content it's giving me this error message in the emulator: "Something's not right. File not downloaded yet" File links are currently coming from Buzztouch. Should I try uploading and linking them from a different server? Also, any clues as to why my splash screen is showing up and then not again on relaunch? And as a general recommendation SPECIFIC TO ANDROID do you recommend linking images or embedding/saving them with the project? P.S. I have since also tried testing the app on an Android device with the same problem.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/30/12 03:03 PM (13 years ago)
Hi @tgnmpr, First thing I would do is verify that the links are accessible from a browser. Then I would like to see some LogCat output from the time when you get that error. What you have above looks to me like it came from the Console. All it's showing is that the apk installed and the program is running. I would expect the splash screen to run only the first time the app is launched. Usually when somebody "exist" an app it remains running in the background. Launching it again generally just brings you back to where you left off. Only if you really kill the app process and open the app again would I expect to see the splash screen. In general, for both Android and iOS, if media you want included in your app is static (won't change), like images or videos or sounds, I would include that media with the app itself. Things that will change, and that you don't want to submit a whole new package to update the app with, I'd reference those via URLs. Mark
 
Nicks App
Code is Art
Profile
Posts: 426
Reg: May 21, 2014
Las Vegas
6,010
like
06/06/14 12:20 PM (11 years ago)
Mark - I'm having a similar problem - only with Android. Works fine with iOS. "itemType":"BT_screen_menuListSimple", "itemNickname":"Travel Map", "navBarTitleText":"Travel Map", "listRowBackgroundColor":"#000000", "listTitleFontColor":"#FFFF33", "backgroundImageNameSmallDevice":"bkgds.png", "backgroundImageNameLargeDevice":"bkgdl.png", "backgroundImageScale": "bottom", I get no background image in Emulator nor on the Android device. Just a white screen. On iOS (Simulator and iPhone 5S) I get the correct background. The menu text is in gold #FFFF33... which is correct. The rows are white (supposed to be black #000000). OK in iOS, wrong in Android.
 

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.