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
Well you can have a BroadcastReceiver declared in your manifest to receive the BOOT_COMPLETED broadcast and then respond to that in your BroadcastReceiver and do what you like. | |
<receiver android:name="MyBootReceiver" | |
android:enabled="true" | |
android:exported="true" | |
android:label="BootReceiver"> | |
<intent-filter> | |
<action android:name="android.intent.action.BOOT_COMPLETED"></action> | |
</intent-filter> |
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
gcc -I/opt/jdk6/jdk1.6.0_45/include -I/opt/jdk6/jdk1.6.0_45/include/linux -o libhello.so -shared hello.c | |
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
<supports-screens | |
android:resizeable="true" | |
android:smallScreens="true" | |
android:normalScreens="true" | |
android:largeScreens="true" | |
android:anyDensity="true" | |
/> |
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
# Built application files | |
/*/build/ | |
# Crashlytics configuations | |
com_crashlytics_export_strings.xml | |
# Local configuration file (sdk path, etc) | |
local.properties | |
# Gradle generated files |
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 scroll bar in drawable(scrollbar.xml) using this | |
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<gradient | |
android:angle="45" | |
android:centerColor="#669C79E7" | |
android:endColor="#66C0C0C0" | |
android:startColor="#669C70E2" /> |
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
==> ffmpeg decode video | |
ffmpeg -i Untitled_Project-Apple_ProRes_422.mov -f rawvideo -pix_fmt yuv420p Untitled_Project-Apple_ProRes_422.yuv | |
==> ffmpeg slicing video | |
ffmpeg -i Untitled_Project-Apple_ProRes_422.mov -pix_fmt yuv420p -ss 00:00:00 -t 00:00:15 part1_420p.mov | |
==> adding into container format |
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 | |
git init | |
echo "git init successfully" | |
git status | |
echo "git status" | |
git add -f * | |
echo "adding files successfully" | |
echo "set-up email & name" |
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
When a PCB back from product line without LCD, how to test WIFI basic function? | |
We can usually use below commands in adb shell with root permission | |
//Check if wlan.ko was loaded | |
lsmod | |
//If not, please install it | |
insmod /system/lib/modules/wlan.ko | |
//Check if it correctly installed |
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 static Bitmap getRoundedBitmap(Bitmap bitmap) { | |
final Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888); | |
final Canvas canvas = new Canvas(output); | |
final int color = Color.RED; | |
final Paint paint = new Paint(); | |
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); | |
final RectF rectF = new RectF(rect); | |
paint.setAntiAlias(true); |
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 signal | |
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice | |
import commands | |
import sys | |
def execute(): | |
running = True | |
while running: | |
# starting script |
OlderNewer