Posted on Leave a comment

The Evolution of Android Network Access

Modern background execution in Android [https://android-developers.googleblog.com/2018/10/modern-background-execution-in-android.html]

Background Processing in Android [https://medium.com/@julian_falcionelli/background-processing-in-android-575fd4ecf769]
Background Processing in Android (Part 2) [https://medium.com/major-league/background-processing-in-android-part-2-88c73c24a2ac]
Continue reading The Evolution of Android Network Access

Posted on Leave a comment

Retrofit [2]

https://habrahabr.ru/post/314028/

http://java-help.ru/retrofit-2-review/

Configuring Retrofit 2 Client in Android [https://proandroiddev.com/configuring-retrofit-2-client-in-android-130455eaccbd]

Building your own Retrofit Call Adapter [https://android.jlelse.eu/building-your-own-retrofit-call-adapter-b198169bab69]

An HTTP inspector for Android & OkHTTP (like Charles but on device) – More Chucker than Chuck [https://github.com/ChuckerTeam/chucker]

Mock retrofit in kotlin coroutines [https://blog.kotlin-academy.com/a-little-reflection-about-coroutines-34050cbc4fe6]

Continue reading Retrofit [2]

Posted on Leave a comment

LinkifyCompat, get Urls

[code language=”java”]
import android.support.v4.text.util.LinkifyCompat;

@Nullable
public void find(@NonNull String text) {
List<String> urls = getLinkifiedUrls(text);
for (String url : urls) {
//
}
}

private List<String> getLinkifiedUrls(String text) {
SpannableString ss = new SpannableString(text);
LinkifyCompat.addLinks(ss, Linkify.WEB_URLS);
URLSpan[] urls = ss.getSpans(0, ss.length(), URLSpan.class);
ArrayList<String> result = new ArrayList<>();
for (URLSpan url : urls) {
result.add(url.getURL());
}
return result;
}
[/code]