Skip to content

Instantly share code, notes, and snippets.

View NaCI's full-sized avatar
🏠
Working from home

Naci NaCI

🏠
Working from home
View GitHub Profile
import android.location.Location
import com.example.hmsgmssinglecodebase.LocationHelper;
class DashboardActivity : AppCompatActivity(), LocationHelper.GlobalLocationCallback {
...
companion object {
...
const val REQUEST_CHECK_SETTINGS = 999
import android.annotation.SuppressLint
import android.app.Activity
import android.content.IntentSender
import android.location.Location
import android.os.Looper
import com.huawei.hms.common.ResolvableApiException
import com.huawei.hms.location.*
class LocationHelper @JvmOverloads constructor(
private val activity: Activity,
@NaCI
NaCI / medium_gms_hms_locationhelper_gms.kt
Last active June 8, 2021 12:57
Location Helper GMS
import android.annotation.SuppressLint
import android.app.Activity
import android.content.IntentSender.SendIntentException
import android.location.Location
import android.os.Looper
import com.google.android.gms.common.api.ResolvableApiException
import com.google.android.gms.location.*
class LocationHelper @JvmOverloads constructor(
private val activity: Activity,
dependencies {
...
//Google Services
gmsImplementation "com.google.android.gms:play-services-location:${googleGmsVersion}"
//Huawei Services
hmsImplementation "com.huawei.agconnect:agconnect-core:${hmsVersion}"
hmsImplementation "com.huawei.hms:location:${hmsLocationVersion}"
}
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Hms")) {
apply plugin: 'com.huawei.agconnect'
} else {
apply plugin: 'com.google.gms.google-services'
}
@NaCI
NaCI / medium_gms_hms_flavors.java
Created November 13, 2020 12:15
build.gradle flavor implementation
flavorDimensions …, "services"
productFlavors {
...
gms {
dimension "services"
buildConfigField "String", "SERVICE_USED", '"gms"'
}
@NaCI
NaCI / Mssql_notes.txt
Created August 24, 2020 06:24
MsSql Notlar
NOTLAR
Data Manipülasyon Komutları (Select, Insert, Update, Delete, ...)
Veritabanı Manipülasyon Komutları (Create, Alter, Drop, ...)
SELECT
Use VeritabanıAdı
Select sütun1, [sütun adı 2], sütun3 From tablo1
@NaCI
NaCI / important_commands_doc.md
Last active June 17, 2020 09:55
Important Unix Commands

Şu ana kadar kullandığım ve önemli bulduğum linux komutlarını paylaşmak istiyorum :


sudo su : root şifresi tanımlama

. = bulunduğun dizin

~ = Home

~/.bashrc = kullanıcı ile ilgili kofigürasyonların tutulduğu klasör

@NaCI
NaCI / fastlane_with_appcenter_actions.md
Last active May 18, 2024 04:29
Tutorial to implement App Center and Fastlane scripts to Android Project
@NaCI
NaCI / basics.kt
Last active April 27, 2020 23:25
Kotlin Notes
/**
* ANY type holds any type of object.
* The root of the Kotlin class hierarchy. Every Kotlin class has Any as a superclass.
*/
/**
* Almost everything in Kotlin is an expression with a value, but there a few exceptions.
* WHILE loops and FOR loops are not expression with a value
*/