System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
#define AppId "{INSERT HERE YOUR GUID}" | |
#define AppName "My App" | |
#define AppVersion "1.7" | |
[CustomMessages] | |
english.NewerVersionExists=A newer version of {#AppName} is already installed.%n%nInstaller version: {#AppVersion}%nCurrent version: | |
[Code] | |
// find current version before installation | |
function InitializeSetup: Boolean; | |
var Version: String; |
public static class ExceptionParser { | |
private final ResponseBody body; | |
private final String bodyString; | |
private final Converter.Factory converterFactory; | |
public ExceptionParser(Response response, Converter.Factory converterFactory) { | |
this.converterFactory = converterFactory; | |
this.body = cloneResponseBody(response.errorBody()); | |
this.bodyString = getBodyAsString(body); | |
} |
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
@Override | |
public boolean dispatchTouchEvent(MotionEvent ev) { | |
final Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragment_container); | |
if (fragment instanceof IDispatchTouchEvent) | |
return ((IDispatchTouchEvent) fragment).dispatchTouchEvent(ev) || super.dispatchTouchEvent(ev); | |
return super.dispatchTouchEvent(ev); | |
} |
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c
and [c
.
Choose which version you want to keep with :diffget //2
or :diffget //3
(the //2
and //3
are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
#Install android build tools, platforms | |
#Supported versions here https://circleci.com/docs/android | |
dependencies: | |
override: | |
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-24.0.2,android-23,extra-google-m2repository,extra-google-google_play_services,extra-android-m2repository | |
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies | |
#Pull any submodules | |
checkout: | |
post: |
# | |
# Circle CI & gradle.properties live in harmony | |
# | |
# Android convention is to store your API keys in a local, non-versioned | |
# gradle.properties file. Circle CI doesn't allow users to upload pre-populated | |
# gradle.properties files to store this secret information, but instaed allows | |
# users to store such information as environment variables. | |
# | |
# This script creates a local gradle.properties file on current the Circle CI | |
# instance. It then reads environment variable TEST_API_KEY_ENV_VAR which a user |
#Android and CI and Gradle (A How-To)
There are tech stacks in this world that make it dead simple to integrate a CI build system.
The Android platform is not one of them.
Although Gradle is getting better, it's still a bit non-deterministic, and some of the fixes you'll need will start to feel more like black magic than any sort of programming.
But fear not! It can be done!
Before we embark on our journey, you'll need a few things to run locally:
#include <iostream> | |
#include <windows.h> | |
#pragma comment(lib, "advapi32.lib") | |
int main() | |
{ | |
HCRYPTPROV hProvider = 0; | |
if (!::CryptAcquireContextW(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) | |
return 1; |
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |