Skip to content

Instantly share code, notes, and snippets.

View Lavanyagaur22's full-sized avatar
🚩

Lavanya gaur Lavanyagaur22

🚩
View GitHub Profile

GSoC 2019 JBoss - Lavanya Gaur

Project:

Offix-Android- Conflict Resolution and Offline Support for the Aerogear Android SDK

Offix-Android is a project that helps the developers to extend capabilities of Apollo GraphQL by providing fully-featured offline Workflow and Conflict Resolution for Android Platform. Developers can:-

  • Perform queries and mutations when offline and these would be automatically synced to the server when they come online.
  • Provide their custom conflict resolution strategies (i.e their own business logic) to resolve conflicts among the data.

It also enables working with locally cached GraphQL compliant data without access to the server. It will leverage the capabilities of Apollo GraphQL cache do deliver a seamless experience for querying data even when server-side data is not reachable.

override fun onBindViewHolder(holder: TaskHolder, position: Int) {
val currentTask = notes[position]
var title_task = currentTask.title
var desc_task = currentTask.desc
var id_task = currentTask.id.toString()
var checkBool = true
with(holder.itemView) {
user_switch.isChecked = false
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
'''downlaod iris.csv from https://raw.githubusercontent.com/uiuc-cse/data-fa14/gh-pages/data/iris.csv'''
#Load Iris.csv into a pandas dataFrame.
iris = pd.read_csv("/Users/lavanya/Datasets/iris.csv")
dependencies {
def biometric_version = "1.0.0"
implementation fileTree(dir: 'libs', include: ['*.jar'])
...
implementation "androidx.biometric:biometric:$biometric_version"
}
dependencies {
def biometric_version = "1.0.0"
implementation fileTree(dir: 'libs', include: ['*.jar'])
...
implementation "androidx.biometric:biometric:$biometric_version"
}
val biometricPrompt = BiometricPrompt(activity, executor, object : BiometricPrompt.AuthenticationCallback() {
override fun onAuthenticationError(errorCode: Int, errString: CharSequence) {
super.onAuthenticationError(errorCode, errString)
if (errorCode == BiometricPrompt.ERROR_NEGATIVE_BUTTON) {
// user clicked negative/cancel button
} else {
TODO("Called when an unrecoverable error has been encountered and the operation is complete.")
}
}
val promptInfo = BiometricPrompt.PromptInfo.Builder()
.setTitle("Authentication prompt!")
/*Subtitle and description are optional parameters, so, you can skip those parameters.
.setSubtitle("Set the subtitle to display.")
.setDescription("Verification required")*/
.setNegativeButtonText("Cancel")
.build()
dependencies {
def camerax_version = '1.0.0-alpha06'
...
implementation 'ai.fritz:core:4.2.0'
implementation "ai.fritz:vision:4.2.0"
...
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
}
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
android:orientation="vertical"
tools:context=".MainActivity">
<TextureView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
/*In the MainActivity class, initialize Fritz SDK.
*/
Fritz.configure(this, API_KEY)
/*Instead of calling `startCamera()` on the main thread, we use `viewFinder.post { ... }`
to make sure that `viewFinder` has already been inflated into the view when `startCamera()` is called.