Skip to content

Instantly share code, notes, and snippets.

./gradlew :module:androidDependencies
./gradlew :module:dependencyInsight --configuration=debugAndroidTestRuntimeClasspath --dependency=uiautomator
./gradlew -q dependencies module:androidDependencies
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2. in line 1.
Fixes for androidx-class-mapping.csv
android.support.v7.widget.GridLayoutManager,androidx.recyclerview.widget.GridLayoutManager
com.android.databinding.library,androidx.databinding.library
#!/bin/bash
#================================>
## Constants
ANDROID_SDK_HOME=$HOME
ANDROID_HOME=$ANDROID_SDK_HOME/Android_SDK
EMULATOR_IMAGE="system-images;android-28;google_apis_playstore;x86_64"
#================================>
## Tools
SDKMANAGER=$ANDROID_HOME/tools/bin/sdkmanager
AVDMANAGER=$ANDROID_HOME/tools/bin/avdmanager
using System;
using System.Threading;
using System.Threading.Tasks;
namespace BSSConsumer.Core
{
public static class FuncUtils
{
public static readonly IRetryPolicy DefaultRetryPolicy = new FibonacciRetryPolicy();
public static class TaskRetryExtension
{
public static readonly IRetryPolicy DefaultRetryPolicy = new FibonacciRetryPolicy();
public static Task<T> WithRetry<T>(this Task<T> task, int maxNumOfRetries, CancellationToken token)
{
return RetryTask(task, 0, maxNumOfRetries, token, DefaultRetryPolicy);
}
public static Task<T> WithRetry<T>(this Task<T> task, int maxNumOfRetries, CancellationToken token, IRetryPolicy retryPolicy)
val messageCount = 8
val notification = Notification.Builder(this, id)
.setContentTitle(getString(R.string.title_discounts))
.setContentText(getString(R.string.description_discounts))
.setSmallIcon(R.drawable.ic_airplanemode_active_grey_24dp)
.setBadgeIconType(BADGE_ICON_SMALL)
.setNumber(messageCount)
.build()
notificationManager.notify(notificationID, notification)
using System;
using System.Threading.Tasks;
using Android;
using Android.Content.PM;
using Android.OS;
using Android.Support.V4.Content;
using MvvmCross.Core.ViewModels;
using NMFoundation.MvvmCross.Core;
using NMFoundation.MvvmCross.Droid;
public interface DataService {
@Headers({
"Accept: application/json",
"Content-Type: application/json",
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
})
@GET("reviews.json?count=5&page=0&rating=0&sortBy=date_of_review&direction=DESC")
Call<ReviewResponse> listData();
}
VfOnlineSupport.getInstance().getVfChat().addChatAvailabilityListeners(new VfChatAvailabilityListener() {
@Override
public void trackAvailability(GenesysStatus.ChatMode chatMode, String selectedTopic) {
if (chatMode != null) {
HashMap<String, Object> hashMap = new HashMap<>();
String chatState = TrackingConstants.VF_CONTEXT_CHAT_STATUS_OFFLINE;
if (chatMode.equals(GenesysStatus.ChatMode.online)) {
setOnlineChatButtonState(State.ONLINE);
chatState = TrackingConstants.VF_CONTEXT_CHAT_STATUS_AVAILABLE;
public void printTopContributor(GitHubApi gitHubApi, final String repoName) {
// 1. Fetch the repository.
gitHubApi.getRepository(repoName)
// 2. Fetch a list of all contributors.
.flatMap(new Function<Repository, SingleSource<? extends List<Contributor>>>() {
@Override
public SingleSource<? extends List<Contributor>> apply(Repository repository) throws Exception {
return repository.getContributors();
}
})