yarn add react-native-configreact-native link react-native-config- Create
.envfiles for each configuration. Ex:.env.dev,.env.prod, etc Ex:
API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| import androidx.compose.animation.core.RepeatMode | |
| import androidx.compose.animation.core.animateFloat | |
| import androidx.compose.animation.core.infiniteRepeatable | |
| import androidx.compose.animation.core.rememberInfiniteTransition | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.fillMaxSize | |
| import androidx.compose.foundation.layout.height | |
| import androidx.compose.foundation.layout.offset |
yarn add react-native-configreact-native link react-native-config.env files for each configuration. Ex: .env.dev, .env.prod, etc
Ex:API_ENDPOINT=https://api.myresource.com/dev
ENV=dev
| // Test 1 | |
| for (int i = 0; i < 10; i++) { | |
| // spawn new thread which call queryNoTransaction() | |
| } | |
| void queryNoTransaction() { | |
| try (Realm realm = Realm.getDefaultInstance()) { | |
| long start = System.currentTimeMillis(); | |
| RealmResults<UserProfile> users = realm.where(UserProfile.class).findAll(); | |
| List<UserProfile> userCopy = realm.copyFromRealm(users); |
| if (BuildConfig.DEBUG) { | |
| StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() | |
| .detectCustomSlowCalls() | |
| .detectDiskReads() | |
| .detectDiskWrites() | |
| .detectNetwork() | |
| .penaltyLog() | |
| .build()); | |
| StrictMode.VmPolicy.Builder vmPolicy = new StrictMode.VmPolicy.Builder() |
| public class ExcellentAdventure { | |
| @Retention(SOURCE) | |
| @StringDef({ERA_BC, ERA_AD}) | |
| public @interface Era { | |
| } | |
| public static final String ERA_BC = "BC"; | |
| public static final String ERA_AD = "AD"; |
<hash> with your gist's hash):
# with ssh
git clone git@gist.github.com:<hash>.git mygist
# with httpsgit clone https://gist.github.com/.git mygist
| package ***.***.android.utils; | |
| import android.Manifest; | |
| import android.app.Activity; | |
| import android.app.Fragment; | |
| import android.content.Context; | |
| import android.content.pm.PackageManager; | |
| import android.support.v13.app.FragmentCompat; | |
| import android.support.v4.app.ActivityCompat; | |
| import android.support.v4.content.ContextCompat; |
This requires the latest version of apktool.
apktool d $APK_PATH -o $OUTPUT_FOLDER
# Open the apktool.yml text file
# Alter the versionCode and versionName entries
# now rebuild!
apktool build $OUTPUT_FOLDER