Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 32

Solver
Aspiring developer
Profile
Posts: 37
Reg: Jan 07, 2013
LOS
10,820
12/31/13 04:31 AM (11 years ago)

iconURL not displaying in android

Hi all, I am using menu Image Advanced and the Button Menu plugins for a project. When i pass a dynamic JSON to them, it displays in iOS but not in Android. Both plugins leave the place holder for where the image should be but wont display in both emulator and android devices. I get this error in the logcat: 12-30 16:34:59.592: W/ZZ(703): Cr_menu_advanced: TitleDescIcon selected 12-30 16:34:59.602: W/ZZ(703): BT_strings:getSaveAsFileNameFromURL from: "http://img.youtube.com/vi/RVCCNaBaan4/2.jpg" file name: "2.jpg" 12-30 16:34:59.602: W/ZZ(703): BT_fileManager: getImageFromURL: http://img.youtube.com/vi/RVCCNaBaan4/2.jpg 12-30 16:34:59.612: W/ZZ(703): BT_fileManager: An exception occurred trying to get an image from a URL: android.os.NetworkOnMainThreadException Any help will do. Thanks
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/31/13 05:51 AM (11 years ago)
It seems that your app is having problem while trying to save the image in cache. But cannot tell you more without the complete log cat output.
 
Solver
Aspiring developer
Profile
Posts: 37
Reg: Jan 07, 2013
LOS
10,820
like
12/31/13 05:53 AM (11 years ago)
Hey Sandeep, Can I send you the logCat via PM
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/31/13 05:54 AM (11 years ago)
Better if you can send me on email. sandeepkurne (at) gmail (dot) com.
 
Solver
Aspiring developer
Profile
Posts: 37
Reg: Jan 07, 2013
LOS
10,820
like
12/31/13 05:57 AM (11 years ago)
Sent. Thanks
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/31/13 05:59 AM (11 years ago)
I got it. Will take a look and come back with what i find.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/31/13 06:06 AM (11 years ago)
I dont see any error in the logcat so i assume that the app works perfectly on your device except that the icon images are not showing. However i find this message multiple times- "BT_fileManager: An exception occurred trying to get an image from a URL: android.os.NetworkOnMainThreadException". For some reason the app is not saving the image in cache. If possible you can include the icon images in your project itself. Put those icons in the res-->drawable folder and you are good to go.
 
Solver
Aspiring developer
Profile
Posts: 37
Reg: Jan 07, 2013
LOS
10,820
like
12/31/13 06:10 AM (11 years ago)
Well the thing is that the images are being fed dynamically from a JSON file. Adding the images will be huge as there are so many of them.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/31/13 06:17 AM (11 years ago)
Yes, you are correct and much more including all those images might cause memory crash problems. I have not used CR_Menu plugin so am not so sure why exactly the app is having difficulty to store the image in cache. If its possible to you to send me the project file, i can have a look at it tomorrow in the morning. Its already night here and i have to go to celebrate new year event with my friends.
 
Solver
Aspiring developer
Profile
Posts: 37
Reg: Jan 07, 2013
LOS
10,820
like
12/31/13 06:19 AM (11 years ago)
Yes will send it right away
 

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.