Starting from Android Marshmallow (API 23), users will be asked for permissions while the app is running. This way, a user is able to choose which permissions they should grant without affecting the application flow. In this tutorial I will cover requesting runtime permissions in Android M and N, how to perform a request, get its result and then handle it.
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 com.google.android.gms.common.GoogleApiAvailability | |
import com.google.android.gms.tasks.Task | |
import splitties.init.appCtx | |
import kotlin.coroutines.experimental.suspendCoroutine | |
val googleApiAvailability = GoogleApiAvailability.getInstance()!! | |
inline val playServicesAvailability get() = googleApiAvailability.isGooglePlayServicesAvailable(appCtx) | |
@JvmName("awaitVoid") | |
suspend fun Task<Void>.await() = suspendCoroutine<Unit> { continuation -> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.vacuum.app.cinema.MainActivity"> | |
<!--SOME CODE FOR MY AppBarLayout--> | |
<!--SOME CODE FOR MY ToolBar--> |
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
open class ScopedViewModel : ViewModel() { | |
private val job = Job() | |
protected val scope: CoroutineScope = job + Dispatchers.Main | |
override fun onCleared() { | |
super.onCleared() | |
job.cancel() | |
} | |
} |
in this Gist you can invite all connictions just by one click
- go to: https://www.linkedin.com/mynetwork/
- press CTRL+SHIFT+I
- write in console this script.
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
ext { | |
// Android | |
minSdkVersion = 14 | |
targetSdkVersion = 28 | |
versionCode = 1 | |
versionName = "1.0" | |
androidCompileSdkVersion = 28 | |
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner" | |
// Libraries | |
ankoVersion = '0.10.4' |
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
pragma solidity ^0.5.0; | |
contract HODLer { | |
uint releaseDate; | |
address owner; | |
// Contract deployer specifies deposit release date in constructor | |
constructor(uint secondsSince1971) public { |
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 'package:flutter/material.dart'; | |
void main() => runApp( | |
MaterialApp( | |
home: BallPage(), | |
), | |
); | |
class BallPage extends StatelessWidget { | |
@override |
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 'dart:async'; | |
import 'dart:convert'; | |
import 'dart:ffi'; | |
import 'dart:io'; | |
import 'package:ffi/ffi.dart'; | |
import 'package:win32/win32.dart'; | |
const healthOffset = 0x12FC58; |
Git and Gihub provide several benefits to the team and is an essential tool to The Taproom for collaboration and flexibility. Here are some of the guidelines we aim to follow:
- Utilize branches - While working on master, branches allow for more
collaboration, conversation, and control around changes being made to the
code. Commits directly to master should be limited to
settings_data
updates, client theme updates, typo fixes and emergency bug fixes.