2016年10月4日
Android Studio You can also reset/revoke a specific permissions using
Android Studio
You can also reset/revoke a specific permissions using
adb shell pm grant com.your.flashlight android.permission.CAMERA
adb shell pm revoke com.your.package android.permission.CAMERA
adb shell pm grant android.permission.CAMERA
adb shell pm reset-permissions
you should also add C:/android-sdk/platform-tools to you environment path
2016年8月21日
Flashlight App For Android
Flashlight App For Android
Google play>Flashlight App
Original design. A brand-new easy-to-use interface. Fast, bright, colorful, beautiful and featuring instant-on startup.
It has the standard lowest-permissions-needed and the standard ability to turn on your LED flash on the back of your phone.
LED flash
Interface color changes
Countdown
SOS flash
Thanks for all your feedback and support!
Google play>Flashlight App
Original design. A brand-new easy-to-use interface. Fast, bright, colorful, beautiful and featuring instant-on startup.
It has the standard lowest-permissions-needed and the standard ability to turn on your LED flash on the back of your phone.
LED flash
Interface color changes
Countdown
SOS flash
Thanks for all your feedback and support!
2016年6月13日
Draw SurfaceView from layout xml
Draw SurfaceView from layout xml
Xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >
<TextView
android:id="@+id/textView_idd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<jacky.justin.superflashlight.GameViewA
android:id="@+id/surfaceView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</FrameLayout>
</RelativeLayout>
MySurfaceView
public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback, OnTouchListener {
MainActivity mainActivity;
public GameViewA(Context context) {
super(context);
}
public GameViewA(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
// TODO Auto-generated constructor stub
}
public GameViewA(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}
Xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >
<TextView
android:id="@+id/textView_idd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<jacky.justin.superflashlight.GameViewA
android:id="@+id/surfaceView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</FrameLayout>
</RelativeLayout>
MySurfaceView
public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback, OnTouchListener {
MainActivity mainActivity;
public GameViewA(Context context) {
super(context);
}
public GameViewA(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
// TODO Auto-generated constructor stub
}
public GameViewA(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}
訂閱:
文章 (Atom)