This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- reset scratch variables at the start --> | |
| {{ $.Scratch.Set "bl_title" false }} | |
| {{ $.Scratch.Set "bl_subtitle" false }} | |
| {{ $.Scratch.Set "bl_link" false }} | |
| {{ $.Scratch.Set "bl_thumbnail" false }} | |
| {{ if .IsNamedParams }} | |
| {{ $.Scratch.Set "bl_subtitle" (.Get "subtitle") }} | |
| {{ $.Scratch.Set "bl_link" (.Get "link") }} | |
| {{ $.Scratch.Set "bl_thumbnail" (.Get "thumbnail") }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object YourKeys { | |
| init { | |
| System.loadLibrary("native-lib") | |
| } | |
| external fun apiKey(): String | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <jni.h> | |
| #include <string> | |
| extern "C" JNIEXPORT jstringJNICALL | |
| Java_com_package_name_YourKeys_apiKey(JNIEnv *env, jobject object) { | |
| std::string api_key = "your_api_key"; | |
| return env->NewStringUTF(api_key.c_str()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| android { | |
| compileSdkVersion 23 | |
| buildToolsVersion "23.0.2" | |
| defaultConfig { | |
| applicationId "com.texturelabs.rosera.pop_movies" | |
| minSdkVersion 14 | |
| targetSdkVersion 23 | |
| versionCode 1 | |
| versionName "1.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Constants { | |
| const val API_KEY = "abcdefg2q4qsaf34rtyy421k" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <!--API Key--> | |
| <string name="api_key">abcdefg2q4qsaf34rtyy421k</string> | |
| </resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val securePreferences = EncryptedSharedPreferences.create( | |
| "secure_prefs", | |
| mainKeyAlias, | |
| applicationContext, | |
| EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV, | |
| EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM | |
| ) | |
| // Storing Data in Preferences | |
| with(securePreferences.edit()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val keyGenParameterSpec = MasterKeys.AES256_GCM_SPEC | |
| val mainKeyAlias = MasterKeys.getOrCreate(keyGenParameterSpec) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val preferences = getSharedPreferences("normal_prefs", MODE_PRIVATE) | |
| // Storing Data in Preferences | |
| with(preferences.edit()) { | |
| putBoolean("Bool", true) | |
| putString("String", "Some normal string value") | |
| putInt("Integer", 10) | |
| commit() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object CustomerData { | |
| var customerId = “123” | |
| var name = “John” | |
| var totalBill = 284.34 | |
| var purchasedItems: List<Item> = arrayListOf() | |
| fun addItem(item: Item) { | |
| purchasedItems.add(item) | |
| totalBill = calculateBill() | |
| } |
NewerOlder