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
import android.app.Activity | |
import android.content.Context | |
import android.util.Log | |
import androidx.compose.runtime.mutableStateOf | |
import com.android.billingclient.api.* | |
import com.android.billingclient.api.Purchase | |
import com.holdtorun.serverdog.application.dataStore | |
import com.holdtorun.serverdog.secrets.BillingId | |
import com.holdtorun.serverdog.tools.MyLogging | |
import com.holdtorun.serverdog.tools.MyToasts |
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
// TODO For implementation see coding video series https://youtube.com/playlist?list=PLQVB-tSJSr656zCJoViyF3MYlKGljVTT7&si=4xY8dV7XkrV_7f1f | |
class ConsentTracker(val context: Context) { | |
private val TAG = "ConsentTracker" | |
private val myLogger = MyLogging() // TODO Log with your own logger | |
fun isUserConsentValid(): Boolean { | |
val isGdpr = isGDPR() | |
val canShowPersAds = canShowPersonalizedAds() |
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
// TODO For implementation see coding video series https://youtube.com/playlist?list=PLQVB-tSJSr656zCJoViyF3MYlKGljVTT7&si=4xY8dV7XkrV_7f1f | |
public class JavaConsentTracker { | |
private static final String TAG = "ConsentTracker"; | |
private final MyLogging myLogger = new MyLogging(); // TODO Log with your own logger | |
private final Context context; | |
public JavaConsentTracker(Context context) { | |
this.context = context; |