- Python 3
- Pip 3
$ brew install python3
fun View.visible() { | |
visibility = View.VISIBLE | |
} | |
fun View.invisible() { | |
visibility = View.INVISIBLE | |
} | |
fun View.gone() { | |
visibility = View.GONE |
public String processTime(String s) { | |
// parse server time | |
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss"); | |
Date reviewDate = null; | |
try { | |
reviewDate = sdf.parse(s); | |
}catch(Exception ex){ | |
ex.printStackTrace(); | |
} |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cards.notification"> | |
<uses-sdk | |
android:minSdkVersion="17" | |
android:targetSdkVersion="17" /> | |
<application | |
android:allowBackup="true" |
/** | |
* needs permission: user_photos, publish_actions | |
* | |
* PSEUDOCODE: | |
* if (hasPhoto) { | |
* albumId = getAlbumId(); | |
* if (albumId == null) { | |
* albumId = createAndGetAlbumId(); | |
* } | |
* photoId(s) = addPhotoToAlbumAndGetId(albumId); |
#!/bin/bash | |
# Get the IP of the connected android device | |
IP=`adb shell netcfg | grep wlan0 | awk '{ print $3 }' | awk -F'/' '{ print $1 }'` | |
# Port used for connecting, on device. Change as required | |
DEBUG_PORT='5555' | |
# Start the adb as tcpip deamon | |
adb tcpip $DEBUG_PORT |