Android Question donwload list image url web

Discussion in 'Android Questions' started by ivanomonti, Sep 7, 2015.

  1. ivanomonti

    ivanomonti Well-Known Member Licensed User

    I need to download images from a link, I downloaded this code, but sometimes I crash ... but I do not view errors

    Code:
    Sub Download (ImageViewsMap As Map)   
        
    For i = 0 To ImageViewsMap.Size - 1
            tasks.Put(ImageViewsMap.GetKeyAt(i), ImageViewsMap.GetValueAt(i))
            
    Dim link As String = ImageViewsMap.GetValueAt(i)
            
    If cache.ContainsKey(link) Then
                
    Dim iv As ImageView = ImageViewsMap.GetKeyAt(i)
                CenterBitmap(iv,
    cache.Get(link))
            
    Else If ongoingTasks.ContainsKey(link) = False Then
                ongoingTasks.Put(link, 
    "")
                
    Dim j As HttpJob
                j.Initialize(link, Me)
                j.Download(link)
            
    End If
        
    Next
    End Sub
    Code:
    Sub CenterBitmap(iv As View, bmpT As Bitmap)
        
    Private bmp As Bitmap = bmpT
        
    Private cvs As Canvas
        cvs.Initialize(iv)
      
        
    Dim rectDest As Rect
        
    Dim delta As Int
        
    If bmp.Width / bmp.Height > iv.Width / iv.Height Then
            delta = (iv.Height - bmp.Height / bmp.Width * iv.Width) / 
    2
            rectDest.Initialize(
    0, delta,iv.Width, iv.Height - delta)
        
    Else
            delta = (iv.Width - bmp.Width / bmp.Height * iv.Height) / 
    2
            rectDest.Initialize(delta, 
    0, iv.Width - delta, iv.Height)
        
    End If
        cvs.DrawBitmap(bmp, 
    Null, rectDest)
        iv.Invalidate
    End Sub
    Code:
    ** Service (imagedownloader) Destroy **
    ** 
    Activity (main) Create, isFirst = true **
    ** 
    Activity (main) Resume **
    ** 
    Service (httputils2service) Create **
    ** 
    Service (httputils2service) Start **
    ** 
    Service (httputils2service) Start **
    city: [{
    "city":"Saronno VA"},{"city":"Solaro MI"}]
    category: [{"category":"Bar"},{"category":"Hotel"},{"category":"Personal Trainer"},{"category":"Pizzerie"},{"category":"Ristoranti"}]
    SELECT * FROM (SELECT * FROM `post` AS T1 where category = 'Hotel' OR category = 'Residence' OR category = 'Agriturismo' OR category = 'Case vacanze' OR category = 'Ostelli' OR category = 'Masserie' OR category = 'Bed & bredfast' OR category = 'Campeggi' OR category = 'Rifuggi' OR category = 'Stabilimenti balneari') AS t2 where city like '%Saronno VA%' and visible='true'
    Message longer than Log limit (4000). Message was truncated.
    postfilter: [{"id":"3","title":"U3RhcmhvdGVscyBHcmFuZCBNaWxhbg==","content":"U2l0dWF0byBhIFNhcm9ubm8sIGEgNTAwIG1ldHJpIGRhbGxhIHN0YXppb25lIGNpdHRhZGluYSwgY2hlIG9mZnJlIGNvbGxlZ2FtZW50aSBwZXIgTWlsYW5vLCBsbyBTdGFyaG90ZWxzIEdyYW5kIE1pbGFuIMOoIHVuIGhvdGVsIGRpIGRlc2lnbiBjaGUgcHJlc2VudGEgdW5hIHBhbGVzdHJhIGdyYXR1aXRhLCB1biBlbGVnYW50ZSByaXN0b3JhbnRlLCBsYSBjb25uZXNzaW9uZSBXaS1GaSBzZW56YSBjb3N0aSBhZ2dpdW50aXZpIGUgY2FtZXJlIG8gYXBwYXJ0YW1lbnRpIG1vZGVybmkuCgpRdWVzdG8gaG90ZWwgYSA0IHN0ZWxsZSBzb3JnZSBhIDIwIG1pbnV0aSBkaSBhdXRvIGRhbGxhIEZpZXJhIGRpIE1pbGFubyBlIGEgMiBrbSBkYWxsJ3VzY2l0YSBkZWxsJ2F1dG9zdHJhZGEgQTksIGUgb2ZmcmUgdW4gc2Vydml6aW8gbmF2ZXR0YSBkdXJhbnRlIGxlIGZpZXJlIGNvbW1lcmNpYWxpIHBpw7kgaW1wb3J0YW50aS4KCkxlIGNhbWVyZSBlIGdsaSBhcHBhcnRhbWVudGkgc29ubyB0dXR0aSBjbGltYXRpenphdGkgZSBwcmVzZW50YW5vIHVuIGRlc2lnbiBjb250ZW1wb3JhbmVvIGNvbiBtb2JpbGkgaW4gbGVnbm8gd2VuZ8OpIHNjdXJvLCBiYWduaSBtb2Rlcm5pIGUgdW4gbWluaWJhci4KCklsIEdyYW5kIE1pbGFuIG9mZnJlIGxhIHByaW1hIGNvbGF6aW9uZSBhIGJ1ZmZldCBlIHByZXNlbnRhIHVuIGltcG9uZW50ZSBjZW50cm8gYnVzaW5lc3MgY29uIDYgc2FsZSByaXVuaW9uaSwgZSB1biByaXN0b3JhbnRlLCBIb3N0YXJpYSwgY2hlIHNlcnZlIHBpYXR0aSBkZWxsYSBjdWNpbmEgaW50ZXJuYXppb25hbGUgZSBpdGFsaWFuYS4KCkwnaG90ZWwgZGlzcG9uZSBkaSB1biBnYXJhZ2UsIGlub2x0cmUgdHJvdmVyZXRlIHVuIHBhcmNoZWdnaW8gcHViYmxpY28gZ3JhdHVpdG8gZGkgZnJvbnRlIGFsbGEgc3RydXR0dXJhLg==","phone":"+3902963631","fax":"","mobile":"","email":"No email","url":"No url","linkimage1":"http:\/\/www.starhotels.com\/assets\/components\/phpthumbof\/cache\/Castille_Paris_Salon-de-the_2.32a3f43007e51be6c3c0a3e5060e8e69.jpg","linkimage2":"http:\/\/www.starhotels.com\/assets\/components\/phpthumbof\/cache\/Castille_Paris_Salon-de-the_2.32a3f43007e51be6c3c0a3e5060e8e69.jpg","address":"VmlhIFZhcmVzZSAyMw==","zip":"21047","city":"U2Fyb25ubyBWQQ==","state":"Italia","visible":"true","hide":"2015-09-06","show":"2016-08-31","category":"Hotel","menuindex":"2","lat":"45.622749","lng":"9.028635","linkmap":"No link map","informativa":"true","publicacatalogo":"true","publicamobile":"true","autor":"Human Equality","autorid":"1"},{"id":"4","title":"SG90ZWwgUGlvcHBldG8gU2Fyb25ubw==","content":"SWwgY2VudHJvIGRpIE1pbGFubyDDqCBmYWNpbG1lbnRlIHJhZ2dpdW5naWJpbGUgZ3JhemllIGFsIHRyZW5vIGNoZSBkYWxsYSBzdGF6aW9uZSBkaSBTYXJvbm5vIChUUkVOT1JEKSBwb3J0YSBkaXJldHRhbWVudGUgYSBNaWxhbm8g4oCTIFN0YXppb25lIENhZG9ybmEuIENvbW9kYW1lbnRlIHJhZ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Gl6aW9uZSBkaSB1biBmYXggbyBsYSBzdGFtcGEgZGkgZG9jdW1lbnRpIG1hIGFuY2hlIGzigJlhY2Nlc3NvIGFsbGEgcmV0ZSBXaS1GaSwgaWxsaW1pdGF0byBlZCBhbmNvcmEgcGnDuSB2ZWxvY2UuIElub2x0cmUsIHNlbXByZSBhIHR1YSBkaXNwb3NpemlvbmUgaWwgc2Vydml6aW8gZGkgbGF2YW5kZXJpYSBleHByZXNzLCBjb24gcmljb25zZWduYSBhbmNoZSBpbiBnaW9ybmF0YSBwZXIgaSB0dW9pIGNhcGksIGlsIHJvb20gc2VydmljZSwgcGVyIHVuIHNpbXBhdGljbyBzbmFjayBvIHVuIHBhc3RvIHZlbG9jZSBlLCBwZXIgaSBwYWxhdGkgcGnDuSBlc2lnZW50aSwgUm9vbSBzZXJ2aWNlIFZJUCwgdW7igJlhY2N1cmF0YSBzZWxlemlvbmUgZGkgcHJvcG9zdGUgZGlyZXR0YW1lbnRlIGRhbGxhIG5vc3RyYSBjYXJ0YSwgc2VtcGxpY2VtZW50ZSBkYSBvcmRpbmFyZSBlIGd1c3RhcmUgZGlyZXR0YW1lbnRlIG5lbCBjb21mb3J0IGRlbGxhIHR1YSBjYW1lcmEu","phone":"+390296248164","fax":"","
    Message longer than Log limit (4000). Message was truncated.
    ** Service (imagedownloader) Create **
    ** Service (imagedownloader) Start **
    ** Service (imagedownloader) Start **
    SELECT * FROM `post` where city like '%Saronno VA%' and visible='true' and menuindex=3
    postfilter: 0:
    SELECT * FROM (SELECT * FROM `post` AS T1 where category = 'Hotel' OR category = 'Residence' OR category = 'Agriturismo' OR category = 'Case vacanze' OR category = 'Ostelli' OR category = 'Masserie' OR category = 'Bed & bredfast' OR category = 'Campeggi' OR category = 'Rifuggi' OR category = 'Stabilimenti balneari') AS t2 where city like '%Solaro MI%' and visible='true'
    postfilter: [{"id":"2","title":"SG90ZWwgRGVtbw==","content":"T2JiaWV0dGl2aQoKTGF2b3JpYW1vIHBlciBjb2xtYX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NlIGNvbXBldGVuemUuIG5vbiDDqCBzb2xvIGRlbCBjb250cmlidXRvIGRlbCBzYXBlcmUgaW5mb3JtYXRpY28gY2hlIGFiYmlhbW8gYmlzb2dubzogc3Blc3NvLCBpbmZhdHRpLCBwZXIgcmVhbGl6emFyZSBpIHByb2dldHRpIHNpIG1ldHRvbm8gaW4gY2FtcG8gY29ub3NjZW56ZSBlIGFiaWxpdMOgIGxlZ2F0ZSBhZCBhbHRyaSBhbWJpdGksIG1hIGFuY2hlIHNlbnNvIHByYXRpY28sIGNvbm9zY2VuemEgZGVsbGUgdGVjbm9sb2dpZSwgdm9nbGlhIGRpIGNvbm9zY2VyZSwgZGkgbWV0dGVyc2kgYWxsYSBwcm92YSBlIGRpIGRvbmFyZSBwYXJ0ZSBkaSBzw6ggcGVyIGRhcmUgdW4gYWl1dG8gY29uY3JldG8gYWdsaSBhbHRyaS4=","phone":"+393929824007","fax":"+393929824007","mobile":"+393929824007","email":"demo@humaneqaulity.eu","url":"www.humanequality.eu","linkimage1":"http:\/\/humanequality.ivanomonti.eu\/variant\/img\/humanequality00.jpg","linkimage2":"http:\/\/humanequality.ivanomonti.eu\/variant\/img\/humanequality00.jpg","address":"VmlhIGRlbCBjb21tZXJjaW8gMg==","zip":"20020","city":"U29sYXJvIE1J","state":"Italia","visible":"true","hide":"2015-09-06","show":"2016-08-31","category":"Hotel","menuindex":"2","lat":"45.622148","lng":"9.107527","linkmap":"No link map","informativa":"true","publicacatalogo":"true","publicamobile":"true","autor":"Human Equality","autorid":"1"}]
    SELECT * FROM `post` where city like '%Solaro MI%' and visible='true' and menuindex=3
    postfilter: [{"id":"9","title":"U2VydmljZSBJdmFubyBNb250aQ==","content":"U2NoZWRhIGRlbW8gU2VydmljZQ==","phone":"3929824007","fax":"","mobile":"3929824007","email":"ivanomonti@libero.it","url":"www.ivanomonti.eu","linkimage1":"https:\/\/scontent-mxp1-1.xx.fbcdn.net\/hphotos-xpt1\/v\/t1.0-9\/11695888_937190299678410_6735849001657102279_n.jpg?oh=0f09c50bc95998995aa1a5c035034c15&oe=56669C0A","linkimage2":"https:\/\/scontent-mxp1-1.xx.fbcdn.net\/hphotos-xpt1\/v\/t1.0-9\/11695888_937190299678410_6735849001657102279_n.jpg?oh=0f09c50bc95998995aa1a5c035034c15&oe=56669C0A","address":"dmlhIGRlbCBjb21tZXJjaW8gMg==","zip":"20020","city":"U29sYXJvIE1J","state":"Italia","visible":"true","hide":"2015-08-31","show":"2016-08-25","category":"Personal Trainer","menuindex":"3","lat":"45.622148","lng":"9.107527","linkmap":"No link map","informativa":"true","publicacatalogo":"true","publicamobile":"true","autor":"Human Equality","autorid":"2"}]
    SELECT * FROM `post` where city like '%Solaro MI%' and visible='true' and menuindex=1
    postfilter: [{"id":"1","title":"T3BlcmF0b3IgSXZhbm8gTW9udGk=","content":"U2NoZWRhIHRlY25pY2Egb3BlcmF0b3I=","phone":"3929824007","fax":"","mobile":"3929824007","email":"ivanomonti@libero.it","url":"www.ivanomonti.eu","linkimage1":"http:\/\/humanequality.ivanomonti.eu\/variant\/img\/humanequality00.jpg","linkimage2":"http:\/\/humanequality.ivanomonti.eu\/variant\/img\/humanequality00.jpg","address":"dmlhIGRlbCBjb21tZXJjaW8gMg==","zip":"20020","city":"U29sYXJvIE1J","state":"Italia","visible":"true","hide":"2015-08-31","show":"2016-08-25","category":"Personal Trainer","menuindex":"1","lat":"45.622148","lng":"9.107527","linkmap":"No link map","informativa":"true","publicacatalogo":"true","publicamobile":"true","autor":"Human Equality","autorid":"1"}]
    SELECT * FROM `post` where city like '%Solaro MI%' and visible='true' and menuindex=2
    postfilter: [{"id":"2","title":"SG90ZWwgRGVtbw==","content":"T2JiaWV0dGl2aQoKTGF2b3JpYW1vIHBlciBjb2xtYXJlIGlsIGRpdmFyaW8gZGlnaXRhbGUgZSBwZXIgZmF2b3JpcmUgdW4gcHJvY2Vzc28gZGkgY3Jlc2NpdGEsIGluZGl2aWR1YWxlIG8gZGkgZ3J1cHBvLCBjaGUg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HRpLCBwZXIgcmVhbGl6emFyZSBpIHByb2dldHRpIHNpIG1ldHRvbm8gaW4gY2FtcG8gY29ub3NjZW56ZSBlIGFiaWxpdMOgIGxlZ2F0ZSBhZCBhbHRyaSBhbWJpdGksIG1hIGFuY2hlIHNlbnNvIHByYXRpY28sIGNvbm9zY2VuemEgZGVsbGUgdGVjbm9sb2dpZSwgdm9nbGlhIGRpIGNvbm9zY2VyZSwgZGkgbWV0dGVyc2kgYWxsYSBwcm92YSBlIGRpIGRvbmFyZSBwYXJ0ZSBkaSBzw6ggcGVyIGRhcmUgdW4gYWl1dG8gY29uY3JldG8gYWdsaSBhbHRyaS4=","phone":"+393929824007","fax":"+393929824007","mobile":"+393929824007","email":"demo@humaneqaulity.eu","url":"www.humanequality.eu","linkimage1":"http:\/\/humanequality.ivanomonti.eu\/variant\/img\/humanequality00.jpg","linkimage2":"http:\/\/humanequality.ivanomonti.eu\/variant\/img\/humanequality00.jpg","address":"VmlhIGRlbCBjb21tZXJjaW8gMg==","zip":"20020","city":"U29sYXJvIE1J","state":"Italia","visible":"true","hide":"2015-09-06","show":"2016-08-31","category":"Hotel","menuindex":"2","lat":"45.622148","lng":"9.107527","linkmap":"No link map","informativa":"true","publicacatalogo":"true","publicamobile":"true","autor":"Human Equality","autorid":"1"},{"id":"8","title":"U3RydWN0dXJlIEl2YW5vIE1vbnRp","content":"U2NoZWRhIGRlbW8gc3RydWN0dXJl","phone":"3929824007","fax":"","mobile":"3929824007","email":"ivanomonti@libero.it","url":"www.ivanomonti.eu","linkimage1":"https:\/\/scontent-mxp1-1.xx.fbcdn.net\/hphotos-xpt1\/v\/t1.0-9\/11695888_937190299678410_6735849001657102279_n.jpg?oh=0f09c50bc95998995aa1a5c035034c15&oe=56669C0A","linkimage2":"https:\/\/scontent-mxp1-1.xx.fbcdn.net\/hphotos-xpt1\/v\/t1.0-9\/11695888_937190299678410_6735849001657102279_n.jpg?oh=0f09c50bc95998995aa1a5c035034c15&oe=56669C0A","address":"dmlhIGRlbCBjb21tZXJjaW8gMg==","zip":"20020","city":"U29sYXJvIE1J","state":"Italia","visible":"true","hide":"2015-08-31","show":"2016-08-25","category":"Personal Trainer","menuindex":"2","lat":"45.622148","lng":"9.107527","linkmap":"No link map","informativa":"true","publicacatalogo":"true","publicamobile":"true","autor":"Human Equality","autorid":"2"}]
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Resume **
    Select * FROM `news`
    Message longer than Log limit (4000). Message was truncated.
    news: [{"id":"1","title":"TWFya2V0aW5n","content":"Q29z4oCZw6ggaWwgTWFya2V0aW5nOiBiaXNvZ25pLCB0ZW9yaWEgZGkgTWFzbG93LCBUZW9yaWEgZGkgSGVyemJlcmcsIGRlc2lkZXJpLCBpbCBwcm9jZXNzbyBkZWNpc2lvbmFsZSwgbGEgZ2VuZXJhemlvbmUgZGVsbGEgZG9tYW5kYSwgcHJvZG90dGkgZSBzZXJ2aXppLCB2YWxvcmUgZSBzb2RkaXNmYXppb25lLCBsYSBxdWFsaXTDoCwgaWwgbWVyY2F0bywgIGVzZXJjaXRhemlvbmkuCgpJbCBNYXJrZXRpbmc6IGlsIG1hcmtldGluZyBzdHJhdGVnaWNvLCBpbCBtYXJrZXRpbmcgb3BlcmF0aXZvL01hcmtldGluZyBNaXgsIGlsIFByb2RvdHRvLCBsYSBtYXJjYS9icmFuZCwgbGEgYnJhbmQgZXF1aXR5LCBpbCBwcmV6em8sIGlsIHBvc2l6aW9uYW1lbnRvLCBsYSBwcm9tb3ppb25lL2NvbXVuaWNhemlvbmUsIGVzZXJjaXRhemlvbmkuCgpMYSBDb211bmljYXppb25lOiBpIGZvbmRhbWVudGFsaSBkZWxsYSBjb211bmljYXppb25lLCBsYSBwdWJibGljaXTDoCwgbGEgdmVuZGl0YSBwZXJzb25hbGUsIGxhIHByb21vemlvbmUgZGVsbGUgdmVuZGl0ZSwgbGUgcHViYmxpY2hlIHJlbGF6aW9uaSwgZXNlcmNpdGF6aW9uaS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKCklsIFBpYW5vIGRpIE1hcmtldGluZzogZGF0aSBkaSBiYXNlIGRlbCBwcm9kb3R0bywgYW5hbGlzaSBkZWwgbWVyY2F0bywgY2ljbG8gZGkgdml0YSBkZWwgcHJvZG90dG8sIGNvbWJpbmF6aW9uZSBwcm9kb3R0by9tZXJjYXRvLCBsYSBtYXRyaWNlIGRpIEJvc3RvbiwgbGEgbWF0cmljZSBkaSBBbnNvZmYsICBsYSBTV09UIGFuYWxpc2ksIGlsIG1vZGVsbG8gZGkgUG9ydGVyLCBsYSBjdXJ2YSBBQkMsIG9iaWV0dGl2aSwgcGlhbmkgZOKAmWF6aW9uZSwgY29udG8gZWNvbm9taWNvIGRpIHByb2RvdHRvLCBtYXJnaW5lIGRpIGNvbnRyaWJ1emlvbmUsIHJlZGRpdGl2aXTDoCwgYnJlYWsgLSBldmVuIHBvaW50IG8gcHVudG8gZGkgcGFyZWdnaW8uIAoKR2xpIEluZGljaSBkaSBNZXJjYXRvOiBsYSB2YXJpYXppb25lIHBlcmNlbnR1YWxlLCBsYSBkaXN0cmlidXppb25lIHBlcmNlbnR1YWxlLCBsYSBxdW90YSBkaSBtZXJjYXRvLCBs4oCZaW5kaWNlIGRpIHBlbmV0cmF6aW9uZSwgbOKAmWluZGljZSBkaSBldm9sdXppb25lLCBs4oCZaW5kaWNlIGRpIHBlcmZvcm1hbmNlLCBlc2VyY2l0YXppb25pLiAKCkkgU2lzdGVtaSBFVE1TOiBsYSBzY2hlZGEgbWVkaWNvLCBsYSBzY2hlZGEgb3NwZWRhbGUsIGxhIGNyZWF6aW9uZSBkaSBsaXN0ZSwgaWwgcmFwcG9ydG8gdmlzdGUsIGzigJlhbmFsaXNpIGRlaSBkYXRpLg==","linkimage1":"http:\/\/blog.tradetrackeritaly.it\/wp-content\/uploads\/2014\/02\/marketing.jpg","autor":"Human Equality","show":"2015-08-25","hide":"2015-09-01","address":"","city":""},{"id":"2","title":"UHJvZnVnaGksIGzigJlhcHBlbGxvIGRpIFBhcGEgRnJhbmNlc2NvOiDigJxPZ25pIHBhcnJvY2NoaWEgYWNjb2xnYSB1bmEgZmFtaWdsaWHigJ0=","content":"QmVyZ29nbGlvIGR1cmFudGUgbCdhbmdlbHVzIGhhIGludml0YXRvICJsZSBjb211bml0w6AgcmVsaWdpb3NlLCBpIG1vbmFzdGVyaSwgaSBzYW50dWFyaSBkaSB0dXR0YSBFdXJvcGEgZSBsZSBkaW9jZXNpLCBhIHBhcnRpcmUgZGEgcXVlbGxhIGRpIFJvbWEiIGEgZGFyZSBhaSBtaWdyYW50aSAidW5hIHNwZXJhbnphIGNvbmNyZXRhIiBlIGEgbm9uIGNyZWFyZSDigJx0YW50ZSBpc29sZSBpbmFjY2Vzc2liaWxpIGUgaW5vc3BpdGFsaeKAnQ==","linkimage1":"http:\/\/st.ilfattoquotidiano.it\/wp-content\/uploads\/2015\/08\/Papa675.jpg","autor":"Human Equality","show":"2015-08-31","hide":"2015-09-07","address":"","city":""},{"id":"3","title":"UG9tcGVpLiBQYXVyYSB0cmEgaSBmZWRlbGkgaW50cmFwcG9sYXRpIHN1bCBjYW1wYW5pbGUgcGVyIGR1ZSBvcmU6IHNhbHZhdGkgZGEgdm9sb250YXJp","content":"UG9tcGVpLiBBdHRpbWkgZGkgdGVuc2lvbmUgaW4gcGlhenphIEJhcnRvbG8gTG9uZ286IDE1IGZlZGVsaSDigJxvc3RhZ2dpb+KAnSBwZXIgZHVlIG9yZSBzdWwgY2FtcGFuaWxlLiBTYWx2YXRpIGRhaSB2b2xvbnRhcmkgZGVsbOKAmWFzc29jaWF6aW9uZSBjYXJhYmluaWVyaS4gTOKAmWFzY2Vuc29yZSDDqCBhbmRhdG8gaW4gY29ydG8gY2lyY3VpdG8gYmxvY2NhbmRvc2kgZWQgaW1wZWRlbmRvIGFsIGN1c3RvZGUgZGkgcmlzYWxpcmUgYSByaXByZW5kZXJlIGlsIGdydXBwbyBkb3BvIGkgMTUgbWludXRpIHN0YWJpbGl0aS4gSSBmZWRlbGksIHRyYSBpIHF1YWxpIGR1ZSBiYW1iaW5pIGUgdW4gYW56aWFubywgbm9uIHZlZGVuZG8gcmlzYWxpcmUgbOKAmWFzY2Vuc29yZSwgc29ubyBhbmRhdGkgbmVsIHBhbmljbyBlZCBoYW5ubyBpbml6aWF0byBhIGNoaWVkZXJlIGFpdXRvIGFpIHBhc3NhbnRpIGluIHRyYW5zaXRvIHNvdHRvIGlsIGNhbXBhbmlsZS4gTmF0dXJhbG1lbnRlLCB2aXN0YSBs4oCZZWxldmF0YSBhbHRlenphLCBkYSBnacO5IG5vbiBzaSBjYXBpdmEgYmVuZSBjb3NhIHN0ZXNzZSBhY2NhZGVuZG8uIExlIHBlcnNvbmUgcmltYXN0ZSBibG9jY2F0ZSwgcG9pLCBpZ25vcmF2YW5vIGlsIHBlcmNow6kgbmVzc3VubyBzYWxpdmEgYSByaXByZW5kZXJsaSBlZCDDqCBzY2F0dGF0byBpbCBwYW5pY28uCgpUcmEgaSBjdXN0b2RpIGRlbCBzYW50dWFyaW8gaW4gc2Vydml6aW8gbmVzc3VubyDDqCBzdGF0byBpbiBncmFkbyBkaSBzYWxpcmUgbGUgc2NhbGUgYSBwaWVkaSwgcGVyY2jDqSBhbnppYW5pIGUgaSBncmFkaW5pIHNvbm8gdGFudGlzc2ltaSwgcGVyIG1ldHRlcmUgaW4gc2Fsdm8gbGUgcGVyc29uZS4gTGUgdXJsYSBkZWdsaSDigJxvc3RhZ2dp4oCdLCBjaGUgaGFubm8gdGVtdXRvIGRpIHJpbWFuZXJlIGJsb2NjYXRpIHN1bCBjYW1wYW5pbGUgdHV0dGEgbGEgbm90dGUsIGhhbm5vIGF0dGlyY
    Message longer than Log limit (4000). Message was truncated.
    java.lang.RuntimeException: java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:148)
        at anywheresoftware.b4a.BA$3.run(BA.java:334)
        at android.os.Handler.handleCallback(Handler.java:815)
        at android.os.Handler.dispatchMessage(Handler.java:104)
        at android.os.Looper.loop(Looper.java:194)
        at android.app.ActivityThread.main(ActivityThread.java:5637)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
    Caused by: java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
        at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:634)
        at libcore.io.IoBridge.recvfrom(IoBridge.java:596)
        at java.net.PlainSocketImpl.read(PlainSocketImpl.java:492)
        at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:42)
        at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:242)
        at java.io.InputStream.read(InputStream.java:162)
        at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:149)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:234)
        at java.io.DataInputStream.readByte(DataInputStream.java:75)
        at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:298)
        at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
        ... 9 more
    Caused by: android.system.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
        at libcore.io.Posix.recvfromBytes(Native Method)
        at libcore.io.Posix.recvfrom(Posix.java:185)
        at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250)
        at libcore.io.IoBridge.recvfrom(IoBridge.java:593)
        ... 21 more
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Are you sure that you haven't stopped the program? This message might show from time to time when you stop the program.
     
  3. ivanomonti

    ivanomonti Well-Known Member Licensed User

    To avoid this problem I had to reset the map

    Code:
    Sub Service_reset
        tasks.Initialize
        
    cache.Initialize
        ongoingTasks.Initialize
    End Sub
    code


    Code:
    Sub description(frame As Panel)
        
    Private colroot As Map = frame.Tag
        
    Private lb As EditText
        lb.Initialize(
    "lb")
        lb.Text = Mod_Global.decode64(colroot.Get(
    "content")) & Chr(10) & Chr(10)
        lb.Tag = frame.Tag
        lb.TextColor = 
    Colors.Black
        lb.TextSize = (
    48*90/100)/3
        lb.Wrap = 
    True
        lb.SingleLine = 
    False
        lb.Enabled = 
    False
        frame.AddView(lb,
    5dip,52dip,frame.Width-10dip,frame.Height-58dip)
        
    ' calcolo altezza del controllo editext
        Dim su As StringUtils
        
    Dim i As Int = su.MeasureMultilineTextHeight(lb, lb.Text)
        lb.Height = i
        i = i + 
    30dip
        frame.Height = i
        
    ' inserisco immagine
        If colroot.Get("linkimage1") <> "" Then
            
    Dim img As String = colroot.Get("linkimage1")
            
    Dim iv As ImageView
            iv.Initialize(
    "")
            frame.AddView(iv,
    0,i,frame.Width,150dip)
            
    Dim rec1 As Rect
            rec1.Initialize(
    0,0,frame.Width-1dip,150dip-1dip)
            
    Dim cv As Canvas
            cv.Initialize(iv)
            cv.DrawRect(rec1,
    Colors.White,True,1)
            
    Dim links As Map
              links.Initialize
            links.Put(iv, img)
               CallSubDelayed2(ImageDownloader, 
    "Download", links)
        
    End If
        i = 
    150dip + i + 48dip
        frame.Height = i
        
    ' ricalcolo il top
        t = t + i + 8dip
        
    ' creo 2 righe di divisione        '
        Dim cv As Canvas
        cv.Initialize(frame)
        cv.DrawLine(
    0,48dip,frame.Width,48dip,Colors.ARGB(128,0,0,0),1)
        cv.DrawLine(
    0,frame.Height-49dip,frame.Width,frame.Height-49dip,Colors.ARGB(128,0,0,0),2)
       
    End Sub
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice