mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-04-19 04:37:22 +02:00
parent
f9a64bf6cc
commit
b920f8b095
@ -82,5 +82,15 @@
|
|||||||
android:name="android.appwidget.provider"
|
android:name="android.appwidget.provider"
|
||||||
android:resource="@xml/widget_info"/>
|
android:resource="@xml/widget_info"/>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name=".helpers.MyTileService"
|
||||||
|
android:label="@string/app_launcher_name"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.service.quicksettings.action.QS_TILE" />
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.simplemobiletools.flashlight.helpers
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
|
import android.service.quicksettings.TileService
|
||||||
|
import android.support.annotation.RequiresApi
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.N)
|
||||||
|
class MyTileService : TileService() {
|
||||||
|
override fun onClick() {
|
||||||
|
MyCameraImpl.newInstance(this).toggleFlashlight()
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user