[Android Q&A, Help & Troubleshooting] SunbP:
Hi there ;)

I'd like to code a simple app for IOS devices which displays a feed available on a website, but I don't have URL to do that...

There is an existing app for Android which do it well, so I've uncompiled this APK with APK Studio, with the hope of having the URL in clear in the code....

After hours of researches, I'm stuck with a constant "/data/", and an other ".xml", but don't have the middle !

I tried to show the URL in a Toast(), but the app still crashing (probably I do something wrong)...

If someone has an idea... I'm waiting for it :/ Thanks !

.method public static getFeeds(Ljava/lang/String;)Ljava/util/ArrayList;
.locals 11
.param p0, "s" # Ljava/lang/String;
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/ArrayList",
"<",
"Lfr/.../.../.../...;", #Hidden by myself
">;"
}
.end annotation

.prologue
.line 31
invoke-static {}, Ljavax/xml/parsers/SAXParserFactory;->newInstance()Ljavax/xml/parsers/SAXParserFactory;

move-result-object v3

.line 32
.local v3, "fabrique":Ljavax/xml/parsers/SAXParserFactory;
const/4 v6, 0x0

.line 33
.local v6, "parseur":Ljavax/xml/parsers/SAXParser;
const/4 v2, 0x0

.line 36
.local v2, "entries":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lfr/.../.../.../...;>;"
:try_start_0
invoke-virtual {v3}, Ljavax/xml/parsers/SAXParserFactory;->newSAXParser()Ljavax/xml/parsers/SAXParser;
:try_end_0
.catch Ljavax/xml/parsers/ParserConfigurationException; {:try_start_0 .. :try_end_0} :catch_0
.catch Lorg/xml/sax/SAXException; {:try_start_0 .. :try_end_0} :catch_1

move-result-object v6

.line 44
:goto_0
const/4 v7, 0x0

.line 46
.local v7, "url":Ljava/net/URL;
:try_start_1
new-instance v8, Ljava/net/URL;

new-instance v9, Ljava/lang/StringBuilder;

const-string v10, "/data/"

invoke-direct {v9, v10}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

invoke-virtual {v9, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v9

const-string v10, ".xml"

invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v9

invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v9

invoke-direct {v8, v9}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
:try_end_1
.catch Ljava/net/MalformedURLException; {:try_start_1 .. :try_end_1} :catch_4

.line 51
.end local v7 # "url":Ljava/net/URL;
.local v8, "url":Ljava/net/URL;
:try_start_2
new-instance v4, Lfr/.../.../.../.../ParserXMLHandler;

invoke-direct {v4}, Lfr/.../.../.../.../ParserXMLHandler;-><init>()V
:try_end_2
.catch Ljava/net/MalformedURLException; {:try_start_2 .. :try_end_2} :catch_5

.line 54
.local v4, "handler":Lorg/xml/sax/helpers/DefaultHandler;
:try_start_3
invoke-virtual {v8}, Ljava/net/URL;->openStream()Ljava/io/InputStream;

move-result-object v5

.line 55
.local v5, "input":Ljava/io/InputStream;
if-nez v5, :cond_0

.line 56
const-string v9, "error android"

const-string v10, "null"

invoke-static {v9, v10}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:try_end_3
.catch Lorg/xml/sax/SAXException; {:try_start_3 .. :try_end_3} :catch_2
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_3
.catch Ljava/net/MalformedURLException; {:try_start_3 .. :try_end_3} :catch_5

move-object v7, v8

.line 71
.end local v4 # "handler":Lorg/xml/sax/helpers/DefaultHandler;
.end local v5 # "input":Ljava/io/InputStream;
.end local v8 # "url":Ljava/net/URL;
.restart local v7 # "url":Ljava/net/URL;

:goto_1
return-object v2

.line 37
.end local v7 # "url":Ljava/net/URL;
:catch_0
move-exception v0

.line 38
.local v0, "e":Ljavax/xml/parsers/ParserConfigurationException;
invoke-virtual {v0}, Ljavax/xml/parsers/ParserConfigurationException;->printStackTrace()V

goto :goto_0

.line 39
.end local v0 # "e":Ljavax/xml/parsers/ParserConfigurationException;
:catch_1
move-exception v0

.line 40
.local v0, "e":Lorg/xml/sax/SAXException;
invoke-virtual {v0}, Lorg/xml/sax/SAXException;->printStackTrace()V

goto :goto_0

.line 58
.end local v0 # "e":Lorg/xml/sax/SAXException;
.restart local v4 # "handler":Lorg/xml/sax/helpers/DefaultHandler;
.restart local v5 # "input":Ljava/io/InputStream;
.restart local v8 # "url":Ljava/net/URL;
:cond_0
:try_start_4
invoke-virtual {v6, v5, v4}, Ljavax/xml/parsers/SAXParser;->parse(Ljava/io/InputStream;Lorg/xml/sax/helpers/DefaultHandler;)V

.line 60
check-cast v4, Lfr/.../.../.../.../ParserXMLHandler;

.end local v4 # "handler":Lorg/xml/sax/helpers/DefaultHandler;
invoke-virtual {v4}, Lfr/Lfr/.../.../.../.../ParserXMLHandler;->getData()Ljava/util/ArrayList;
:try_end_4
.catch Lorg/xml/sax/SAXException; {:try_start_4 .. :try_end_4} :catch_2
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_3
.catch Ljava/net/MalformedURLException; {:try_start_4 .. :try_end_4} :catch_5

move-result-object v2

move-object v7, v8

.line 62
.end local v8 # "url":Ljava/net/URL;
.restart local v7 # "url":Ljava/net/URL;
goto :goto_1

.end local v5 # "input":Ljava/io/InputStream;
.end local v7 # "url":Ljava/net/URL;
.restart local v8 # "url":Ljava/net/URL;
:catch_2