Skip to content

Instantly share code, notes, and snippets.

View tsmrecki's full-sized avatar

Tomislav Smrečki tsmrecki

  • Zagreb
View GitHub Profile
package com.bornfight.demo.repository.news
import androidx.paging.ExperimentalPagingApi
import androidx.paging.LoadType
import androidx.paging.PagingState
import androidx.paging.RemoteMediator
import androidx.room.withTransaction
import com.bornfight.common.data.database.AppDatabase
import com.bornfight.common.data.retrofit.ApiInterface
import com.bornfight.demo.model.NewsIte
@tsmrecki
tsmrecki / AndroidManifest.xml
Last active December 20, 2017 09:28
Android Instant App activity intent filter example
<activity android:name=".ProductActivity">
<intent-filter
android:autoVerify="true"
android:order="100">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
@tsmrecki
tsmrecki / build.gradle
Last active December 20, 2017 09:22
Instant App data deep links proper definition
<intent-filter android:autoVerify="true">
...
<data
android:scheme="http"
android:host="example.domain"
android:pathPrefix="/products" />
<data android:scheme="https"/>
</intent-filter>
@tsmrecki
tsmrecki / build.gradle
Last active December 20, 2017 09:06
Base module dependencies example
apply plugin: 'com.android.feature'
android {
baseFeature true
...
}
dependencies {
api 'com.android.support:appcompat-v7:26.0.1'
api 'com.android.support.constraint:constraint-layout:1.0.2'
<meta-data
android:name="default-url"
android:value="https://example.domain" />
@tsmrecki
tsmrecki / build.gradle
Created December 18, 2017 15:42
Instant apps module configuration
apply plugin: 'com.android.instantapp'
dependencies {
implementation project(':product')
implementation project(':productlist')
implementation project(':base')
}
@tsmrecki
tsmrecki / build.gradle
Created December 18, 2017 15:26
Feature module dependencies example
apply plugin: 'com.android.feature'
...
dependencies {
implementation project(':base')
...
}
@tsmrecki
tsmrecki / build.gradle
Last active December 18, 2017 15:22
App module dependcies example
apply plugin: 'com.android.application'
...
dependencies {
implementation project(':product')
implementation project(':productlist')
implementation project(':base')
}
@tsmrecki
tsmrecki / assetlinks.json
Created December 18, 2017 14:41
Asset links configuration file example for App Links
@tsmrecki
tsmrecki / Gameplay.cs
Created May 19, 2016 09:01
Check for input actions
void LateUpdate(){
if (GvrViewer.Instance.BackButtonPressed) {
Application.Quit ();
}
if (GvrViewer.Instance.Triggered) {
SomeAction ();
}
}