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 android.annotation.SuppressLint; | |
import android.content.ContentUris; | |
import android.content.Context; | |
import android.content.CursorLoader; | |
import android.database.Cursor; | |
import android.net.Uri; | |
import android.os.Build; | |
import android.os.Environment; | |
import android.provider.DocumentsContract; | |
import android.provider.MediaStore; |
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
#!/usr/bin/bash | |
# Download zeromq | |
# Ref http://zeromq.org/intro:get-the-software | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
# Unpack tarball package | |
tar xvzf zeromq-4.2.2.tar.gz | |
# Install dependency |
In iOS8, Apple has changed how geo location permissions work. This gist outlines an approach to fix this so Geo will continue to work in iOS8.
Before getting started with the code change, we need to update the tiapp.xml with a few keys.
If you wish to have Geo always run, you need to add the below key. The key NSLocationAlwaysUsageDescription is used when requesting permission to use location services whenever the app is running. To enable this, add the below to the tiapp.xml:
NSLocationAlwaysUsageDescription Reason that appears in the authorization prompt
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"?> | |
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | |
<!-- Generated by RHY @will_awoke --> | |
<module name="Checker"> | |
<property name="charset" value="UTF-8"/> | |
<property name="severity" value="warning"/> | |
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
/** | |
* We're going to create an infinite scrollable list. In this case, we're going to show a date. When you swipe left, | |
* you'll see yesterday. Then the day before yesterday, and so on. Swiping right shows you tomorrow, and so on. | |
*/ | |
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
var isAndroid = Ti.Platform.osname === 'android'; | |
/** | |
* Track where we are in the infinite scrollable views, and define how large of a step goes between each view. | |
*/ | |
var currentDate = new Date(), msIntervalBetweenViews = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/; |