Skip to content

Instantly share code, notes, and snippets.

View liorkup's full-sized avatar

Lior Kpufer liorkup

View GitHub Profile
//Remote Config Solution
public class MainActivity extends AppCompatActivity {
// Remote Config Parameter Key
public static Map<String, String> RC_KEY_TO_EVENT_MAP;
static {
RC_KEY_TO_EVENT_MAP = new HashMap<>();
RC_KEY_TO_EVENT_MAP.put("rc_retention", "p_retention");
RC_KEY_TO_EVENT_MAP.put("rc_complete_level_3", "p_complete_level_3");
RC_KEY_TO_EVENT_MAP.put("rc_complete_level_5", "p_complete_level_5");
//InstanceId solution
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
prefs = getSharedPreferences("com.mycompany.myAppName", MODE_PRIVATE);
setContentView(R.layout.activity_main);
}
@liorkup
liorkup / LICENSE
Created February 12, 2020 13:33
This license applies to all public gists https://gist.github.com/liorkup
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
@liorkup
liorkup / AppDelegate.swift
Last active March 29, 2021 22:45
Glootie snippets
import Firebase
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
...
FirebaseApp.configure()
if !UserDefaults.standard.bool(forKey: "launchedBefore")
{
UserDefaults.standard.set(true, forKey: "launchedBefore")
GoogleAdsACService.app.adToAction(processAction: processActionExample)