This file contains 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
public class InstallReferrerReceiver extends BroadcastReceiver { | |
private static final String TAG = "InstallReferrerReceiver"; | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
HashMap<String, String> values = new HashMap<String, String>(); | |
try { | |
if (intent.hasExtra("referrer")) { | |
String referrers[] = intent.getStringExtra("referrer").split("&"); | |
for (String referrerValue : referrers) { |
This file contains 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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
...> | |
<application ...> | |
<acivity ... /> | |
<!-- Android Market install receiver --> | |
<receiver | |
android:exported="true" | |
android:name="com.your.namespace.InstallReferrerReceiver" > |
This file contains 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
package de.greenrobot.util; | |
import java.util.concurrent.Executor; | |
import android.os.AsyncTask; | |
import android.os.Build; | |
/** | |
* Uses level 11 APIs when possible to use parallel/serial executors and falls back to standard execution if API level | |
* is below 11. |
This file contains 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
#!/bin/bash | |
# Android 4.3+ changes app's internal directory permissions and you can not just pull your | |
# databases to your computer, so I did this as a workaround to extract my databases. | |
# I only use it for debug, use it under your responsability. | |
package=$1 | |
db_name=$2 | |
path="/data/data/$package/" |
This file contains 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
#!/bin/bash | |
f=$(pwd) | |
mkdir drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi | |
# fake argv and argc in bash | |
argc=$#; argv[0]=$0 # argv[0] is a prog name | |
for foo in $( seq $argc ) | |
do |
This file contains 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
/* | |
* Copyright (C) 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
/** | |
* Copyright (c) 2013 Xcellent Creations, Inc. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
This file contains 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
package net.frakbot.util.color; | |
import android.graphics.Color; | |
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2014 Sebastiano Poggi | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains 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
//build.gradle | |
//fixes AndroidStudion<>RoboElectric integration | |
//fixes 'java.lang.RuntimeException: Stub!' and 'NoClassDefFoundError' | |
gradle.projectsEvaluated { | |
def imlFile = file(project.name + '.iml') | |
def parsedXml = (new XmlParser()).parse(imlFile) | |
def jdkNode = parsedXml.depthFirst().orderEntry.find { it.'@type' == 'jdk' } | |
def component = jdkNode.parent() |
This file contains 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
import groovy.transform.Field | |
// This is a drop-in Gradle script that allows you to easily strip out the packages you don't need | |
// from the Google Play Services library. The script will keep track of previous runs to prevent | |
// restripping each time you build. | |
// HOW TO USE THIS | |
// | |
// 1) Download/copy this strip_google_play_services.gradle file into the same location of your app's | |
// build.gradle file. |
OlderNewer