File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/src/main/java/com/javiersantos/whatsappbetaupdater Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ public class Config {
6
6
public static final String GITHUB_TAGS = GITHUB_URL .concat ("/tags" );
7
7
public static final String GITHUB_APK = GITHUB_URL .concat ("/releases/download/" );
8
8
public static final String WHATSAPP_URL = "http://www.whatsapp.com/android/" ;
9
- public static final String WHATSAPP_URL_CDN = "https://www.cdn.whatsapp.net/android/" ;
10
9
public static final String WHATSAPP_APK = WHATSAPP_URL .concat ("current/WhatsApp.apk" );
11
10
public static final String PAYPAL_DONATION =
"[email protected] " ;
12
11
13
- public static final String PATTERN_LATEST_VERSION = "<a class=\" button\" href=\" " ;
12
+ public static final String PATTERN_LATEST_VERSION = "<p class=\" version\" align=\" center\" >Version" ;
13
+ public static final String PATTERN_LATEST_VERSION_CDN = "<a class=\" button\" href=\" " ;
14
14
15
15
}
Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ public static String getLatestWhatsAppVersion() {
308
308
String source = "" ;
309
309
310
310
try {
311
- URL url = new URL (Config .WHATSAPP_URL_CDN );
311
+ URL url = new URL (Config .WHATSAPP_URL );
312
312
313
313
HttpURLConnection connection = (HttpURLConnection ) url .openConnection ();
314
314
connection .connect ();
@@ -332,9 +332,9 @@ public static String getLatestWhatsAppVersion() {
332
332
}
333
333
334
334
String [] split = source .split (Config .PATTERN_LATEST_VERSION );
335
- String urlWithVersion = split [1 ].split ("\" " )[0 ];
335
+ String urlWithVersion = split [1 ].split ("<" )[0 ]. trim () ;
336
336
337
- return UtilsApp . getVersionFromString ( urlWithVersion ) ;
337
+ return urlWithVersion ;
338
338
}
339
339
340
340
public static String getLatestAppVersion () {
You can’t perform that action at this time.
0 commit comments