Re: [android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2016-09-06 Thread Palivela Rakesh
Hi,

How you resolved the issue. I am also facing the same problem.

On Wednesday, March 25, 2015 at 10:44:45 PM UTC+8, Dan Cha wrote:
>
> Original issue resolved, moved my current image issue to new post, thank 
> you for the help everyone.
>
> https://groups.google.com/forum/?hl=en#!topic/android-developers/ivTJ23kXRPY
>
>
> On Tue, Mar 24, 2015 at 5:22 PM, Daniel Chacon  > wrote:
>
>> So i tried this right on the main page of the app and works using the 
>> path that the other one is using.
>>
>> ImageView imageView = (ImageView) findViewById(R.id.imageView);
>>
>> Picasso.with(this)
>> .load("http://www.site.com/imgs/inventory/Video 
>> Game/3_1_Vanellope.jpg")
>> .into(imageView);
>>
>> So since this works with the path, how can i embed the above line into my 
>> code to display each image path that is returned and added to my listview?
>>
>>
>> On Tue, Mar 24, 2015 at 3:19 PM, Daniel Chacon > > wrote:
>>
>>> Can anyone see why the image wouldnt show up, if it is getting a valid 
>>> path?
>>>
>>>
>>>
>>> On Tue, Mar 24, 2015 at 11:50 AM, Daniel Chacon >> > wrote:
>>>
 yes, it has had since i started.. 

 this is what i have in the manifest
 
 >>> android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

 On Tue, Mar 24, 2015 at 11:43 AM, Steve Gabrilowitz  wrote:

> Does your app have internet permission?
> On Mar 24, 2015 12:40 PM, "Daniel Chacon"  > wrote:
>
>> yea after posting and reading over my code and other found, i had 
>> already moved the listview binding code to the postexecute portion and 
>> works.. 
>> But today im trying to get the imageview to show the picture per 
>> record, but again getting the error and cant seem to find in the logcat 
>> file why its failing.
>>
>> I changed things around to make the image bitmap part of items.
>>
>> SoapObject suvas = 
>> (SoapObject) dar.getProperty(i); if (suvas != null) { String c; String 
>> d; 
>> String o; String img; String q; String serv = "http://www.site.com;; 
>> Bitmap ival;
>> c = suvas.getPropertySafelyAsString("Category").toString(); d = 
>> suvas.getPropertySafelyAsString("Description").toString(); o = 
>> suvas.getPropertySafelyAsString("Owned_x0020_By").toString(); img = 
>> serv.concat(suvas.getPropertySafelyAsString("Picture").toString()); q = 
>> suvas.getPropertySafelyAsString("Qty","null").toString(); try { ival = 
>> BitmapFactory.decodeStream((InputStream) new 
>> java.net.URL(img).getContent());
>> items[i] = new InventoryItem(c, o, d, ival, q); } catch (Exception e) 
>> { e.printStackTrace(); } }
>>
>> It ends up in the catch and returns a 
>> java.io.FileNotFoundException: 
>> http://www.site.com/imgs/inventory/Video Game/3_1_Vanellope.jpg
>>
>> But if i copy the URL and paste into my browser, it opens the images 
>> fine.. all images are available, so im sure im doing something wrong.
>>
>> Can anyone pin point any possible issues?
>>
>> This is all within the original posted code, all ive done is change 
>> the few lines above to try and get the image set to the imageview.
>>
>> thank you
>>
>>
>> On Tue, Mar 24, 2015 at 5:53 AM, George Baker > > wrote:
>>
>>> I believe your problem is that you aren't returning the list from 
>>> the background thread (doInBackground()).  I can't tell from your 
>>> changes 
>>> where you are assigning a value to the items variable in you adapter 
>>> constructor but it really should be from the result returned from your 
>>> doInBacground() method.  Also remember all ui access in an AsyncTask 
>>> should 
>>> be in either the on onPreExecute() or onPostExecute() methods.
>>>
>>> Hope this helps,
>>> George
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@googlegroups.com 
>>> 
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com 
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google 
>>> Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, 
>>> send an email to android-developers+unsubscr...@googlegroups.com 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> You received this message because you are subscribed to the Google

Re: [android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2015-03-25 Thread Daniel Chacon
Original issue resolved, moved my current image issue to new post, thank
you for the help everyone.
https://groups.google.com/forum/?hl=en#!topic/android-developers/ivTJ23kXRPY


On Tue, Mar 24, 2015 at 5:22 PM, Daniel Chacon cuban...@gmail.com wrote:

 So i tried this right on the main page of the app and works using the path
 that the other one is using.

 ImageView imageView = (ImageView) findViewById(R.id.imageView);

 Picasso.with(this)
 .load(http://www.site.com/imgs/inventory/Video
 Game/3_1_Vanellope.jpg)
 .into(imageView);

 So since this works with the path, how can i embed the above line into my
 code to display each image path that is returned and added to my listview?


 On Tue, Mar 24, 2015 at 3:19 PM, Daniel Chacon cuban...@gmail.com wrote:

 Can anyone see why the image wouldnt show up, if it is getting a valid
 path?



 On Tue, Mar 24, 2015 at 11:50 AM, Daniel Chacon cuban...@gmail.com
 wrote:

 yes, it has had since i started..

 this is what i have in the manifest
 uses-permission android:name=android.permission.INTERNET /
 uses-permission
 android:name=android.permission.WRITE_EXTERNAL_STORAGE /

 On Tue, Mar 24, 2015 at 11:43 AM, Steve Gabrilowitz 
 steveg1...@gmail.com wrote:

 Does your app have internet permission?
 On Mar 24, 2015 12:40 PM, Daniel Chacon cuban...@gmail.com wrote:

 yea after posting and reading over my code and other found, i had
 already moved the listview binding code to the postexecute portion and
 works..
 But today im trying to get the imageview to show the picture per
 record, but again getting the error and cant seem to find in the logcat
 file why its failing.

 I changed things around to make the image bitmap part of items.

 SoapObject suvas =
 (SoapObject) dar.getProperty(i); if (suvas != null) { String c; String d;
 String o; String img; String q; String serv = http://www.site.com;;
 Bitmap ival;
 c = suvas.getPropertySafelyAsString(Category).toString(); d =
 suvas.getPropertySafelyAsString(Description).toString(); o =
 suvas.getPropertySafelyAsString(Owned_x0020_By).toString(); img =
 serv.concat(suvas.getPropertySafelyAsString(Picture).toString()); q =
 suvas.getPropertySafelyAsString(Qty,null).toString(); try { ival =
 BitmapFactory.decodeStream((InputStream) new
 java.net.URL(img).getContent());
 items[i] = new InventoryItem(c, o, d, ival, q); } catch (Exception e)
 { e.printStackTrace(); } }

 It ends up in the catch and returns a
 java.io.FileNotFoundException:
 http://www.site.com/imgs/inventory/Video Game/3_1_Vanellope.jpg

 But if i copy the URL and paste into my browser, it opens the images
 fine.. all images are available, so im sure im doing something wrong.

 Can anyone pin point any possible issues?

 This is all within the original posted code, all ive done is change
 the few lines above to try and get the image set to the imageview.

 thank you


 On Tue, Mar 24, 2015 at 5:53 AM, George Baker 
 spaceastrono...@gmail.com wrote:

 I believe your problem is that you aren't returning the list from the
 background thread (doInBackground()).  I can't tell from your changes 
 where
 you are assigning a value to the items variable in you adapter 
 constructor
 but it really should be from the result returned from your 
 doInBacground()
 method.  Also remember all ui access in an AsyncTask should be in either
 the on onPreExecute() or onPostExecute() methods.

 Hope this helps,
 George

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send 

[android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2015-03-24 Thread George Baker
I believe your problem is that you aren't returning the list from the 
background thread (doInBackground()).  I can't tell from your changes where you 
are assigning a value to the items variable in you adapter constructor but it 
really should be from the result returned from your doInBacground() method.  
Also remember all ui access in an AsyncTask should be in either the on 
onPreExecute() or onPostExecute() methods. 

Hope this helps,
George 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2015-03-24 Thread Daniel Chacon
So i tried this right on the main page of the app and works using the path
that the other one is using.

ImageView imageView = (ImageView) findViewById(R.id.imageView);

Picasso.with(this)
.load(http://www.site.com/imgs/inventory/Video
Game/3_1_Vanellope.jpg)
.into(imageView);

So since this works with the path, how can i embed the above line into my
code to display each image path that is returned and added to my listview?


On Tue, Mar 24, 2015 at 3:19 PM, Daniel Chacon cuban...@gmail.com wrote:

 Can anyone see why the image wouldnt show up, if it is getting a valid
 path?



 On Tue, Mar 24, 2015 at 11:50 AM, Daniel Chacon cuban...@gmail.com
 wrote:

 yes, it has had since i started..

 this is what i have in the manifest
 uses-permission android:name=android.permission.INTERNET /
 uses-permission
 android:name=android.permission.WRITE_EXTERNAL_STORAGE /

 On Tue, Mar 24, 2015 at 11:43 AM, Steve Gabrilowitz steveg1...@gmail.com
  wrote:

 Does your app have internet permission?
 On Mar 24, 2015 12:40 PM, Daniel Chacon cuban...@gmail.com wrote:

 yea after posting and reading over my code and other found, i had
 already moved the listview binding code to the postexecute portion and
 works..
 But today im trying to get the imageview to show the picture per
 record, but again getting the error and cant seem to find in the logcat
 file why its failing.

 I changed things around to make the image bitmap part of items.

 SoapObject suvas =
 (SoapObject) dar.getProperty(i); if (suvas != null) { String c; String d;
 String o; String img; String q; String serv = http://www.site.com;;
 Bitmap ival;
 c = suvas.getPropertySafelyAsString(Category).toString(); d =
 suvas.getPropertySafelyAsString(Description).toString(); o =
 suvas.getPropertySafelyAsString(Owned_x0020_By).toString(); img =
 serv.concat(suvas.getPropertySafelyAsString(Picture).toString()); q =
 suvas.getPropertySafelyAsString(Qty,null).toString(); try { ival =
 BitmapFactory.decodeStream((InputStream) new
 java.net.URL(img).getContent());
 items[i] = new InventoryItem(c, o, d, ival, q); } catch (Exception e) {
 e.printStackTrace(); } }

 It ends up in the catch and returns a
 java.io.FileNotFoundException: http://www.site.com/imgs/inventory/Video
 Game/3_1_Vanellope.jpg

 But if i copy the URL and paste into my browser, it opens the images
 fine.. all images are available, so im sure im doing something wrong.

 Can anyone pin point any possible issues?

 This is all within the original posted code, all ive done is change the
 few lines above to try and get the image set to the imageview.

 thank you


 On Tue, Mar 24, 2015 at 5:53 AM, George Baker 
 spaceastrono...@gmail.com wrote:

 I believe your problem is that you aren't returning the list from the
 background thread (doInBackground()).  I can't tell from your changes 
 where
 you are assigning a value to the items variable in you adapter constructor
 but it really should be from the result returned from your doInBacground()
 method.  Also remember all ui access in an AsyncTask should be in either
 the on onPreExecute() or onPostExecute() methods.

 Hope this helps,
 George

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message 

Re: [android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2015-03-24 Thread Daniel Chacon
yes, it has had since i started..

this is what i have in the manifest
uses-permission android:name=android.permission.INTERNET /
uses-permission
android:name=android.permission.WRITE_EXTERNAL_STORAGE /

On Tue, Mar 24, 2015 at 11:43 AM, Steve Gabrilowitz steveg1...@gmail.com
wrote:

 Does your app have internet permission?
 On Mar 24, 2015 12:40 PM, Daniel Chacon cuban...@gmail.com wrote:

 yea after posting and reading over my code and other found, i had already
 moved the listview binding code to the postexecute portion and works..
 But today im trying to get the imageview to show the picture per record,
 but again getting the error and cant seem to find in the logcat file why
 its failing.

 I changed things around to make the image bitmap part of items.

 SoapObject suvas = (SoapObject)
 dar.getProperty(i); if (suvas != null) { String c; String d; String o;
 String img; String q; String serv = http://www.site.com;; Bitmap ival;
 c = suvas.getPropertySafelyAsString(Category).toString(); d =
 suvas.getPropertySafelyAsString(Description).toString(); o =
 suvas.getPropertySafelyAsString(Owned_x0020_By).toString(); img =
 serv.concat(suvas.getPropertySafelyAsString(Picture).toString()); q =
 suvas.getPropertySafelyAsString(Qty,null).toString(); try { ival =
 BitmapFactory.decodeStream((InputStream) new
 java.net.URL(img).getContent());
 items[i] = new InventoryItem(c, o, d, ival, q); } catch (Exception e) {
 e.printStackTrace(); } }

 It ends up in the catch and returns a
 java.io.FileNotFoundException: http://www.site.com/imgs/inventory/Video
 Game/3_1_Vanellope.jpg

 But if i copy the URL and paste into my browser, it opens the images
 fine.. all images are available, so im sure im doing something wrong.

 Can anyone pin point any possible issues?

 This is all within the original posted code, all ive done is change the
 few lines above to try and get the image set to the imageview.

 thank you


 On Tue, Mar 24, 2015 at 5:53 AM, George Baker spaceastrono...@gmail.com
 wrote:

 I believe your problem is that you aren't returning the list from the
 background thread (doInBackground()).  I can't tell from your changes where
 you are assigning a value to the items variable in you adapter constructor
 but it really should be from the result returned from your doInBacground()
 method.  Also remember all ui access in an AsyncTask should be in either
 the on onPreExecute() or onPostExecute() methods.

 Hope this helps,
 George

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android 

Re: [android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2015-03-24 Thread Daniel Chacon
yea after posting and reading over my code and other found, i had already
moved the listview binding code to the postexecute portion and works..
But today im trying to get the imageview to show the picture per record,
but again getting the error and cant seem to find in the logcat file why
its failing.

I changed things around to make the image bitmap part of items.

SoapObject suvas = (SoapObject)
dar.getProperty(i); if (suvas != null) { String c; String d; String o;
String img; String q; String serv = http://www.site.com;; Bitmap ival;
c = suvas.getPropertySafelyAsString(Category).toString(); d =
suvas.getPropertySafelyAsString(Description).toString(); o =
suvas.getPropertySafelyAsString(Owned_x0020_By).toString(); img =
serv.concat(suvas.getPropertySafelyAsString(Picture).toString()); q =
suvas.getPropertySafelyAsString(Qty,null).toString(); try { ival =
BitmapFactory.decodeStream((InputStream) new
java.net.URL(img).getContent());
items[i] = new InventoryItem(c, o, d, ival, q); } catch (Exception e) {
e.printStackTrace(); } }

It ends up in the catch and returns a
java.io.FileNotFoundException: http://www.site.com/imgs/inventory/Video
Game/3_1_Vanellope.jpg

But if i copy the URL and paste into my browser, it opens the images fine..
all images are available, so im sure im doing something wrong.

Can anyone pin point any possible issues?

This is all within the original posted code, all ive done is change the few
lines above to try and get the image set to the imageview.

thank you


On Tue, Mar 24, 2015 at 5:53 AM, George Baker spaceastrono...@gmail.com
wrote:

 I believe your problem is that you aren't returning the list from the
 background thread (doInBackground()).  I can't tell from your changes where
 you are assigning a value to the items variable in you adapter constructor
 but it really should be from the result returned from your doInBacground()
 method.  Also remember all ui access in an AsyncTask should be in either
 the on onPreExecute() or onPostExecute() methods.

 Hope this helps,
 George

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2015-03-24 Thread Steve Gabrilowitz
Does your app have internet permission?
On Mar 24, 2015 12:40 PM, Daniel Chacon cuban...@gmail.com wrote:

 yea after posting and reading over my code and other found, i had already
 moved the listview binding code to the postexecute portion and works..
 But today im trying to get the imageview to show the picture per record,
 but again getting the error and cant seem to find in the logcat file why
 its failing.

 I changed things around to make the image bitmap part of items.

 SoapObject suvas = (SoapObject)
 dar.getProperty(i); if (suvas != null) { String c; String d; String o;
 String img; String q; String serv = http://www.site.com;; Bitmap ival;
 c = suvas.getPropertySafelyAsString(Category).toString(); d =
 suvas.getPropertySafelyAsString(Description).toString(); o =
 suvas.getPropertySafelyAsString(Owned_x0020_By).toString(); img =
 serv.concat(suvas.getPropertySafelyAsString(Picture).toString()); q =
 suvas.getPropertySafelyAsString(Qty,null).toString(); try { ival =
 BitmapFactory.decodeStream((InputStream) new
 java.net.URL(img).getContent());
 items[i] = new InventoryItem(c, o, d, ival, q); } catch (Exception e) {
 e.printStackTrace(); } }

 It ends up in the catch and returns a
 java.io.FileNotFoundException: http://www.site.com/imgs/inventory/Video
 Game/3_1_Vanellope.jpg

 But if i copy the URL and paste into my browser, it opens the images
 fine.. all images are available, so im sure im doing something wrong.

 Can anyone pin point any possible issues?

 This is all within the original posted code, all ive done is change the
 few lines above to try and get the image set to the imageview.

 thank you


 On Tue, Mar 24, 2015 at 5:53 AM, George Baker spaceastrono...@gmail.com
 wrote:

 I believe your problem is that you aren't returning the list from the
 background thread (doInBackground()).  I can't tell from your changes where
 you are assigning a value to the items variable in you adapter constructor
 but it really should be from the result returned from your doInBacground()
 method.  Also remember all ui access in an AsyncTask should be in either
 the on onPreExecute() or onPostExecute() methods.

 Hope this helps,
 George

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2015-03-24 Thread Daniel Chacon
Can anyone see why the image wouldnt show up, if it is getting a valid path?



On Tue, Mar 24, 2015 at 11:50 AM, Daniel Chacon cuban...@gmail.com wrote:

 yes, it has had since i started..

 this is what i have in the manifest
 uses-permission android:name=android.permission.INTERNET /
 uses-permission
 android:name=android.permission.WRITE_EXTERNAL_STORAGE /

 On Tue, Mar 24, 2015 at 11:43 AM, Steve Gabrilowitz steveg1...@gmail.com
 wrote:

 Does your app have internet permission?
 On Mar 24, 2015 12:40 PM, Daniel Chacon cuban...@gmail.com wrote:

 yea after posting and reading over my code and other found, i had
 already moved the listview binding code to the postexecute portion and
 works..
 But today im trying to get the imageview to show the picture per record,
 but again getting the error and cant seem to find in the logcat file why
 its failing.

 I changed things around to make the image bitmap part of items.

 SoapObject suvas = (SoapObject)
 dar.getProperty(i); if (suvas != null) { String c; String d; String o;
 String img; String q; String serv = http://www.site.com;; Bitmap ival;
 c = suvas.getPropertySafelyAsString(Category).toString(); d =
 suvas.getPropertySafelyAsString(Description).toString(); o =
 suvas.getPropertySafelyAsString(Owned_x0020_By).toString(); img =
 serv.concat(suvas.getPropertySafelyAsString(Picture).toString()); q =
 suvas.getPropertySafelyAsString(Qty,null).toString(); try { ival =
 BitmapFactory.decodeStream((InputStream) new
 java.net.URL(img).getContent());
 items[i] = new InventoryItem(c, o, d, ival, q); } catch (Exception e) {
 e.printStackTrace(); } }

 It ends up in the catch and returns a
 java.io.FileNotFoundException: http://www.site.com/imgs/inventory/Video
 Game/3_1_Vanellope.jpg

 But if i copy the URL and paste into my browser, it opens the images
 fine.. all images are available, so im sure im doing something wrong.

 Can anyone pin point any possible issues?

 This is all within the original posted code, all ive done is change the
 few lines above to try and get the image set to the imageview.

 thank you


 On Tue, Mar 24, 2015 at 5:53 AM, George Baker spaceastrono...@gmail.com
  wrote:

 I believe your problem is that you aren't returning the list from the
 background thread (doInBackground()).  I can't tell from your changes where
 you are assigning a value to the items variable in you adapter constructor
 but it really should be from the result returned from your doInBacground()
 method.  Also remember all ui access in an AsyncTask should be in either
 the on onPreExecute() or onPostExecute() methods.

 Hope this helps,
 George

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more 

[android-developers] Re: Unfortunately App has stopped is the error im getting and not sure why, all breakpoints make it thru no problem and then the message.

2015-03-23 Thread Dan Cha
So i moved these lines to onPostExecute and it loads my page with the 
appropriate number of rows, but nothing is populated.
In the items there are the 26 rows that should be returned, and now the 
page loads 26 rows but no data is seen on the page.


protected void onPostExecute(Void result)
{
CustomListView adapter = null;
adapter = new 
CustomListView(ViewInventoryActivity.this,R.layout.activity_view_listview_single,items);
list = (ListView)findViewById(R.id.list);
list.setAdapter(adapter);

if(this.dialog.isShowing()){
this.dialog.dismiss();
}
}


On Monday, March 23, 2015 at 4:50:20 PM UTC-5, Dan Cha wrote:

 So i got past some of the earlier issues and changed my pages around to 
 work with actual data being returned from the webservice.

 Everything is returned, populated and as i step thru the code, everything 
 i expect is there.. except when it gets to this line:
 list.setAdapter(adapter);


 From what i can tell it has something to due with the view within its own 
 thread??
 If that is true, what can i look for to correct?

 Here is my custom adapter code:

 public class CustomListView extends ArrayAdapterInventoryItem
 {
 Activity context;
 int layoutResourceId;
 InventoryItem items[] = null;

 public CustomListView(Activity context,int 
 layoutResourceId,InventoryItem[] items)
 {
 super(context, layoutResourceId, items);
 this.context = context;
 this.layoutResourceId = layoutResourceId;
 this.items = items;
 }

 @Override
 public View getView(int position, View view, ViewGroup parent)
 {
 View row = view;
 ItemsHolder holder = null;

 if(row == null)
 {
 LayoutInflater inflater = context.getLayoutInflater();
 row = inflater.inflate(R.layout.activity_view_listview_single, 
 null, true);

 holder = new ItemsHolder();
 holder.imgItem = 
 ((ImageView)row.findViewById(R.id.tvImageValue));
 holder.txtCategory = 
 (TextView)row.findViewById(R.id.tvCategoryValue);
 holder.txtDescription = 
 (TextView)row.findViewById(R.id.tvDescriptionValue);
 holder.txtOwner = 
 (TextView)row.findViewById(R.id.tvOwnerValue);
 holder.txtQty = 
 (TextView)row.findViewById(R.id.tvQuantityValue);
 }
 else
 {
 holder = (ItemsHolder)row.getTag();
 }

 InventoryItem item = items[position];
 return row;
 }

 static class ItemsHolder
 {
 ImageView imgItem;
 TextView txtCategory;
 TextView txtDescription;
 TextView txtOwner;
 TextView txtQty;
 }
 }
 =
 Here is my asynctask code:

 private class ItemTask extends AsyncTaskVoid,Void,Void
 {
 private final ProgressDialog dialog = new 
 ProgressDialog(ViewInventoryActivity.this);
  protected void onPreExecute(){
 this.dialog.setMessage(Returning Item List...);
 this.dialog.show();
 }
  protected Void doInBackground(final Void... unused)
 {
 StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()   
  
 .detectDiskReads()
 .detectDiskWrites()
 .detectNetwork()   
 .penaltyLog()
 .build());
 
 SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,METHOD_NAME);
 SoapSerializationEnvelope envelope = new 
 SoapSerializationEnvelope(SoapEnvelope.VER11);
 
 envelope.dotNet = true;
 envelope.setOutputSoapObject(request);
 
 HttpTransportSE httpTransport = new HttpTransportSE(URL); 
   
 
 try
 { 
  ListHeaderProperty invHeaders = new 
 LinkedListHeaderProperty();
  httpTransport.call(SOAP_ACTION, envelope, 
 (ListHeaderProperty)invHeaders);
  SoapObject response = (SoapObject)envelope.bodyIn;
  
if(response != null)
{  
SoapObject dataset = (SoapObject) response.getProperty(0); 
 
SoapObject table = (SoapObject) 
 dataset.getProperty(diffgram);
SoapObject dar = (SoapObject) table.getProperty(NewDataSet);
Integer recCount = dar.getPropertyCount();
items = new InventoryItem[recCount];
for (int i=0;irecCount;i++)
  {
SoapObject suvas = (SoapObject) dar.getProperty(i); 
if (suvas != null)
{
String c;
String d;
String o;
String img;
String q;
c = suvas.getPropertySafelyAsString(Category).toString();
d = suvas.getPropertySafelyAsString(Description).toString();
o = 
 suvas.getPropertySafelyAsString(Owned_x0020_By).toString();
img = suvas.getPropertySafelyAsString(Picture).toString();