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
answer: http://stackoverflow.com/questions/20176284/buildconfig-debug-always-false-when-building-library-projects-with-gradle | |
Complete documentation can be found here http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication | |
[LIBRARY - build.gradle] | |
android { | |
publishNonDefault true | |
} | |
[APP] |
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
#list avd | |
android list avd | |
#start avd | |
emulator -avd name_avd |
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
#Create a dump of alarms | |
adb shell dumpsys alarm > dump.txt | |
#Create a dump of activities | |
adb shell dumpsys activity |
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
[https://xgouchet.fr/android/index.php?article42/launch-intents-using-adb] | |
# specifying the action and data uri | |
adb shell am start -a "android.intent.action.VIEW" -d "http://developer.android.com" | |
# specifying the action, mime type and an extra string | |
adb shell am start -a "android.intent.action.SEND" --es "android.intent.extra.TEXT" "Hello World" -t "text/plain" | |
# specifying an explicit component name | |
adb shell am start -n "com.example.application/.MainActivity" |
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
android.permission.REAL_GET_TASKS | |
android.permission.ACCESS_CACHE_FILESYSTEM | |
android.permission.REMOTE_AUDIO_PLAYBACK | |
android.permission.REGISTER_WINDOW_MANAGER_LISTENERS | |
android.permission.INTENT_FILTER_VERIFICATION_AGENT | |
android.permission.BIND_INCALL_SERVICE | |
android.permission.WRITE_SETTINGS | |
android.permission.CONTROL_KEYGUARD | |
android.permission.CONFIGURE_WIFI_DISPLAY | |
android.permission.ACCESS_WIMAX_STATE |
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
android.applicationVariants.all { variant -> | |
def appName | |
if (project.hasProperty("applicationName")) { | |
appName = applicationName | |
} else { | |
appName = parent.name | |
} | |
variant.outputs.each { output -> | |
def newApkName |
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 BaseFragment extends Fragment{ | |
private static final String TAG = "base_fragment"; | |
@Override | |
public void onAttach(Context context) { | |
super.onAttach(context); | |
Log.i(TAG, "onAttach()"); | |
} |
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 BaseActivity extends AppCompatActivity{ | |
private static final String TAG = "base_activity"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Log.i(TAG, "onCreate()"); | |
} |
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
Device Real: | |
adb forward tcp:4444 localabstract:/adb-hub | |
adb connect localhost:4444 | |
Emulador: | |
adb -d forward tcp:5601 tcp:5601 |
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
java.util.logging.Logger.getLogger("org.apache.http.wire").setLevel(java.util.logging.Level.FINEST); | |
java.util.logging.Logger.getLogger("org.apache.http.headers").setLevel(java.util.logging.Level.FINEST); | |
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); | |
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); | |
System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug"); | |
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http", "debug"); | |
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.headers", "debug"); |
NewerOlder