Discussion Forums  >  Uncategorized

Replies: 3    Views: 304

MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
01/15/12 12:13 PM (14 years ago)

Android 1.5 & 2.0 Image Gallery Not working with screen data url

I've got a problem with Image Gallery on the Android. This is for BOTH versions 1.5 and the Server version 2.0. If I use individual urls or embedded photos, the gallery works fine. If I use a screen data url, specifically my flickr api, the app crashes. (NOTE: It works fine on iOS.) The error message is 'Sorry! The application Curt Hagman (process com.curthagman) has stopped unexpectedly. Please Try Again. Force Close.' It's clearly a problem with the json parsing, and I can't figure it out. Again, it works fine in iOS. Here's the logcat. Anyone have any suggestions? 01-15 11:01:48.492: I/global(655): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. 01-15 11:01:48.492: W/ZZ(655): BT_screen_images:parseScreenData 01-15 11:01:48.503: W/ZZ(655): BT_screen_images:parseScreenData EXCEPTION org.json.JSONException: Value jsonFlickrApi( of type java.lang.String cannot be converted to JSONObject 01-15 11:01:48.512: D/AndroidRuntime(655): Shutting down VM 01-15 11:01:48.512: W/dalvikvm(655): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 01-15 11:01:48.532: E/AndroidRuntime(655): FATAL EXCEPTION: main 01-15 11:01:48.532: E/AndroidRuntime(655): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.curthagman/com.curthagman.BT_screen_images}: java.lang.ArrayIndexOutOfBoundsException 01-15 11:01:48.532: E/AndroidRuntime(655): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.os.Handler.dispatchMessage(Handler.java:99) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.os.Looper.loop(Looper.java:123) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.app.ActivityThread.main(ActivityThread.java:4627) 01-15 11:01:48.532: E/AndroidRuntime(655): at java.lang.reflect.Method.invokeNative(Native Method) 01-15 11:01:48.532: E/AndroidRuntime(655): at java.lang.reflect.Method.invoke(Method.java:521) 01-15 11:01:48.532: E/AndroidRuntime(655): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 01-15 11:01:48.532: E/AndroidRuntime(655): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 01-15 11:01:48.532: E/AndroidRuntime(655): at dalvik.system.NativeStart.main(Native Method) 01-15 11:01:48.532: E/AndroidRuntime(655): Caused by: java.lang.ArrayIndexOutOfBoundsException 01-15 11:01:48.532: E/AndroidRuntime(655): at java.util.ArrayList.get(ArrayList.java:313) 01-15 11:01:48.532: E/AndroidRuntime(655): at com.curthagman.BT_screen_images.parseScreenData(BT_screen_images.java:495) 01-15 11:01:48.532: E/AndroidRuntime(655): at com.curthagman.BT_screen_images.onStart(BT_screen_images.java:280) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1129) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.app.Activity.performStart(Activity.java:3781) 01-15 11:01:48.532: E/AndroidRuntime(655): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2636) 01-15 11:01:48.532: E/AndroidRuntime(655): ... 11 more
 
jaymobi
Android Fan
Profile
Posts: 35
Reg: Nov 09, 2011
location unknow...
350
like
01/16/12 02:10 PM (14 years ago)
I've been trying to get the data url working for Image gallery on android for 3 weeks with no success. json validates fine at http://jsonlint.com/ gallery opens one random image in my app then have to do a force close and delete cache in app settings before opening app again. Would love to know the solution to this.
 
App Dezine
Android Fan
Profile
Posts: 3
Reg: Jan 18, 2011
New York City
30
like
01/23/12 11:40 AM (14 years ago)
Im having this same problem, any updates about the image gallery for Android would be great.
 
Steven1224
Aspiring developer
Profile
Posts: 4
Reg: Feb 17, 2012
Harrisonburg
40
like
02/25/12 12:41 PM (13 years ago)
Also having this problem, any suggestions would be greatly appreciated.
 

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.