Android Question RSSParser task can be executed only once

hi guys i use the library RSSParser, and here's my code:

RSSParser:
Sub Search_QuerySubmitted(Query As String)
    sv.Iconfied = True
    si.ItemCollapsed = True
    getNews(Query)
End Sub

Sub getNews(country As String)
    Parse("https://news.google.com/rss/search?q=coronavirus%20"&country&"&sortBy=published&hl=en-ID&gl=ID&ceid=ID:en")
End Sub

Sub Parse(url As String)
    rss.ParseRSS(url)
End Sub

Sub RSS_Completed(articles As Object)
    Dim dates As String
    clvNews.Clear
    If articles <> Null Then
        Dim articleList As List = articles
        If articleList.Size > 0 Then
            For i = 1 To 3
                Dim art As Article = articleList.Get(i)
                dates = DateUtils.TicksToString(art.PubDate)
                clvNews.Add(CreateListNews(art.Title, dates, art.Description),art.Link)
            Next
        End If
    End If
End Sub

i used a searchview using appcompat, when i click search for the first time, its worked, but for the second its getting error

Error:
cannot execute task: the task has already been executed (a task can be executed only once) b4a
 
Stay away from libraries that do things that can be done easily without them.

Use OkHttpUtils2 to download the string and parse it with Xml2Map.

i understand how to use okHttputils2 to download the string of json, but i dont understand how it works with xml?

do you have a simple project that work with online rss? please?
 
Upvote 0
Top