This file contains hidden or 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
| sealed class AppPermission( | |
| val permissionName: String, val requestCode: Int, val deniedMessageId: Int, val explanationMessageId: Int | |
| ) { | |
| companion object { | |
| val permissions: List<AppPermission> by lazy { | |
| listOf( | |
| ACCESS_FINE_LOCATION | |
| ) | |
| } | |
| } |
This file contains hidden or 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
| handlePermission(AppPermission.ACCESS_FINE_LOCATION, | |
| onGranted = { | |
| }, | |
| onDenied = { | |
| }, | |
| onRationaleNeeded = { |
This file contains hidden or 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
| handlePermission(AppPermission.ACCESS_FINE_LOCATION, | |
| onGranted = { | |
| }, | |
| onDenied = { | |
| }, | |
| onRationaleNeeded = { |
This file contains hidden or 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
| handlePermission(AppPermission.ACCESS_FINE_LOCATION, | |
| onGranted = { | |
| }, | |
| onDenied = { | |
| }, | |
| onRationaleNeeded = { |
This file contains hidden or 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
| handlePermission(AppPermission.ACCESS_FINE_LOCATION, | |
| onGranted = { | |
| }, | |
| onDenied = { | |
| }, | |
| onRationaleNeeded = { |
This file contains hidden or 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
| handlePermission(AppPermission.ACCESS_FINE_LOCATION, | |
| onGranted = { | |
| }, | |
| onDenied = { | |
| }, | |
| onRationaleNeeded = { |
This file contains hidden or 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
| handlePermissionsResult(requestCode, permissions, grantResults, | |
| onPermissionGranted = { | |
| }, | |
| onPermissionDenied = { | |
| }, | |
| onPermissionDeniedPermanently = { | |
| } |
This file contains hidden or 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
| package com.actinarium.materialcue.analytics; | |
| import android.app.Application; | |
| import android.support.annotation.NonNull; | |
| import android.util.Log; | |
| import com.actinarium.materialcue.dto.Overlay; | |
| import com.actinarium.materialcue.iab.PremiumStatus; | |
| import com.actinarium.materialcue.iab.PremiumStatusChangeListener; | |
| import com.google.android.gms.analytics.HitBuilders; | |
| import com.google.android.gms.analytics.Tracker; |
This file contains hidden or 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
| interface Analytics { | |
| fun track(setup: EventBuilder.() -> Unit = {}) | |
| } | |
| class AnalyticsImpl(private val trackers: MutableList<Tracker>) : Analytics { | |
| init { | |
| trackers.forEach { | |
| if(it.isAnalyticsEnable()){ | |
| it.start() |
This file contains hidden or 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
| interface Analytics { | |
| fun track(setup: EventBuilder.() -> Unit = {}) | |
| } | |
| class AnalyticsImpl(private val trackers: MutableList<Tracker>) : Analytics { | |
| init { | |
| trackers.forEach { | |
| if(it.isAnalyticsEnable()){ | |
| it.start() |