You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: improve scroll performance and responsiveness
- Enable hardware acceleration and high refresh rates
- Optimize New Tab interaction and scroll behavior
- Enable nested scrolling for WebView container
- Allow cleartext traffic for network compatibility
// First attempt: ipwho.is (fast, HTTPS, generous limits, high accuracy)
15
+
// First attempt: ip-api.com (most granular ISP/campus city database, accurately identifies Mymensingh for BAU)
16
+
val ipApiResult = fetchFromIpApiCom()
17
+
if (ipApiResult !=null) return@withContext ipApiResult
18
+
19
+
// Second attempt: ipwho.is (fast, HTTPS fallback with coordinate refinement)
17
20
val ipWhoResult = fetchFromIpWhoIs()
18
21
if (ipWhoResult !=null) return@withContext ipWhoResult
19
22
20
-
// Second attempt: get.geojs.io (unlimited, fast, HTTPS fallback)
21
-
val geoJsResult = fetchFromGeoJs()
22
-
if (geoJsResult !=null) return@withContext geoJsResult
23
+
// Third attempt: get.geojs.io (unlimited, fast, HTTPS fallback with coordinate refinement)
24
+
fetchFromGeoJs()
25
+
}
26
+
}
27
+
28
+
privatefunfetchFromIpApiCom(): IpLocation? {
29
+
var connection:HttpURLConnection?=null
30
+
returntry {
31
+
val url =URL("http://ip-api.com/json/?fields=status,message,country,countryCode,region,regionName,city,district,zip,lat,lon,timezone,isp,org,as,query")
val url =URL(String.format(Locale.US, "https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=%.4f&longitude=%.4f&localityLanguage=en", lat, lon))
0 commit comments