I have tried billions of different manners to solve this but no success.
I have this simple app doing some Gets on a web url, which works perfectly, except when I build and sing the apk file and install on device.
I wonder if someone would have any idea of what is wrong because at this point I am giving up this thing.
My code:
Java:
String url = urlBase + "/" + moeda;
Document html = Jsoup.connect(url).
timeout(Util.TIMEOUT_CONEXAO).
userAgent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0").
header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8").
header("Accept-Language", "pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3").
header("Accept-Encoding", "gzip, deflate").
header("Connection", "keep-alive").
header("Cookie", "_ga=GA1.2.1944138861.1459771567; _gat=1").
header("Host", targetHost).
referrer("http://www.google.com").
ignoreHttpErrors(true).
get();
proguard-android.txt
-keep public class org.jsoup.** {
public *;
}
-keeppackagenames org.jsoup.nodes
Again, when I run directly to the device (normal or debug), it works perfectly, once I do the same but installing from a singed apk file when I press the button to call an AsyncTask to do the get the app breaks, no exception is throw so I cant even know what is the problem.