-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🕊
- Loading branch information
0 parents
commit 4f06c20
Showing
49 changed files
with
1,741 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. | ||
|
||
github : keyiflerolsun | ||
custom : ["https://keyiflerolsun.me/Kahve"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Bu araç @keyiflerolsun tarafından | @KekikAkademi için yazılmıştır. | ||
name: Derleyici | ||
|
||
concurrency: | ||
group: Derleyici | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**/*.md" | ||
- "**/*.jpg" | ||
- "**/*.py" | ||
|
||
jobs: | ||
Derleyici: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name : Depo Kontrolü | ||
uses : actions/checkout@v3 | ||
|
||
- name: JDK 17 Ayarla | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
cache: gradle | ||
java-version: 17 | ||
|
||
- name: Android SDK Ayarla | ||
uses: android-actions/setup-android@v2 | ||
|
||
- name: "'.keystore' OluÅŸtur" | ||
run: | | ||
chmod +x keyStore.sh | ||
./keyStore.sh | ||
- name: Derle | ||
run: | | ||
chmod +x gradlew | ||
./gradlew assembleRelease androidSourcesJar | ||
- name: Release OluÅŸtur | ||
uses: marvinpinto/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
automatic_release_tag: latest | ||
prerelease: false | ||
title: Development Build | ||
files: | | ||
app/build/outputs/apk/release/*.apk | ||
app/build/libs/app-sources.jar |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Gradle files | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Log/OS Files | ||
*.log | ||
|
||
# Android Studio generated files and folders | ||
captures/ | ||
.externalNativeBuild/ | ||
.cxx/ | ||
*.apk | ||
output.json | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea/ | ||
misc.xml | ||
deploymentTargetDropDown.xml | ||
render.experimental.xml | ||
|
||
# Keystore files | ||
*.jks | ||
*.keystore | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
google-services.json | ||
|
||
# Android Profiling | ||
*.hprof |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
} | ||
|
||
android { | ||
namespace = "com.keyiflerolsun.kekiktaban" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "com.keyiflerolsun.kekiktaban" | ||
minSdk = 21 | ||
targetSdk = 33 | ||
|
||
versionCode = 1 | ||
versionName = "0.1" | ||
} | ||
|
||
signingConfigs { | ||
create("release") { | ||
storeFile = file("../Kekik.keystore") | ||
storePassword = "123456" | ||
keyAlias = "key0" | ||
keyPassword = "123456" | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isDebuggable = false | ||
isMinifyEnabled = false | ||
isShrinkResources = false | ||
signingConfig = signingConfigs.getByName("release") | ||
} | ||
} | ||
|
||
buildFeatures { | ||
viewBinding = true | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
freeCompilerArgs = listOf("-Xjvm-default=all-compatibility") | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("androidx.core:core-ktx:1.12.0") | ||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("com.google.android.material:material:1.10.0") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.4") | ||
implementation("com.github.Blatzar:NiceHttp:0.4.4") // HTTP | ||
} | ||
|
||
tasks.register("androidSourcesJar", Jar::class) { | ||
archiveClassifier.set("sources") | ||
from(android.sourceSets.getByName("main").java.srcDirs) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:dataExtractionRules="@xml/data_extraction_rules" | ||
android:fullBackupContent="@xml/backup_rules" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.KekikTaban" | ||
tools:targetApi="o" | ||
> | ||
|
||
<activity android:name=".AnaActivity" android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
</application> | ||
|
||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions
49
app/src/main/java/com/keyiflerolsun/kekiktaban/AnaActivity.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.keyiflerolsun.kekiktaban | ||
|
||
import android.util.Log | ||
import com.keyiflerolsun.kekiktaban.databinding.* | ||
import androidx.appcompat.app.AppCompatActivity | ||
import android.os.Bundle | ||
|
||
// * Konum için import'lar | ||
import android.location.LocationManager | ||
import androidx.core.content.ContextCompat | ||
import android.Manifest | ||
import android.content.pm.PackageManager | ||
|
||
|
||
class AnaActivity : AppCompatActivity() { | ||
private var logTag = "d_KekikTaban" | ||
private lateinit var binding: AnaActivityBinding | ||
|
||
private val fragmentManager = supportFragmentManager | ||
private val fragmentTransaction = fragmentManager.beginTransaction() | ||
private val konumFragment = KonumFragment() | ||
private val apiFragment = ApiFragment() | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
binding = AnaActivityBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
|
||
Log.d(logTag, "Başladım Kanka") | ||
|
||
fragmentTransaction.add(R.id.konumLayout, konumFragment) | ||
fragmentTransaction.add(R.id.apiLayout, apiFragment) | ||
fragmentTransaction.commit() | ||
} | ||
|
||
|
||
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) { | ||
// ! ilk defa konum izni verildiğinde çalışır | ||
if (requestCode == 1) { | ||
if (grantResults.isNotEmpty()) { | ||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { | ||
// ? Konum izni verilmişse konum güncellemelerini başlat | ||
konumFragment.locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1, 1f, konumFragment.locationListener) | ||
} | ||
} | ||
} | ||
super.onRequestPermissionsResult(requestCode, permissions, grantResults) | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
app/src/main/java/com/keyiflerolsun/kekiktaban/ApiFragment.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.keyiflerolsun.kekiktaban | ||
|
||
import android.util.Log | ||
import com.keyiflerolsun.kekiktaban.databinding.* | ||
import androidx.fragment.app.Fragment | ||
import android.view.LayoutInflater | ||
import android.view.ViewGroup | ||
import android.os.Bundle | ||
import android.view.View | ||
|
||
// * HTTP için import'lar | ||
import kotlinx.coroutines.DelicateCoroutinesApi | ||
import kotlinx.coroutines.GlobalScope | ||
import kotlinx.coroutines.launch | ||
import com.lagradost.nicehttp.Requests | ||
|
||
|
||
class ApiFragment : Fragment() { | ||
private var logTag = "d_KekikTaban" | ||
private lateinit var binding: ApiFragmentBinding | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||
binding = ApiFragmentBinding.inflate(layoutInflater) | ||
return binding.root | ||
} | ||
|
||
@OptIn(DelicateCoroutinesApi::class) | ||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
GlobalScope.launch { | ||
apiTest() | ||
} | ||
} | ||
|
||
private suspend fun apiTest() : Boolean { | ||
var oturum = Requests() | ||
|
||
binding.apiText.text = oturum.get("https://wttr.in/Istanbul?format=4").text | ||
|
||
return true | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
app/src/main/java/com/keyiflerolsun/kekiktaban/KonumFragment.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.keyiflerolsun.kekiktaban | ||
|
||
import android.util.Log | ||
import com.keyiflerolsun.kekiktaban.databinding.* | ||
import androidx.fragment.app.Fragment | ||
import android.view.LayoutInflater | ||
import android.view.ViewGroup | ||
import android.os.Bundle | ||
import android.view.View | ||
|
||
// * Konum için import'lar | ||
import android.location.LocationManager | ||
import android.location.LocationListener | ||
import androidx.core.content.ContextCompat | ||
import android.Manifest | ||
import android.content.Context | ||
import android.content.pm.PackageManager | ||
import androidx.core.app.ActivityCompat | ||
|
||
|
||
class KonumFragment : Fragment() { | ||
private var logTag = "d_KekikTaban" | ||
private lateinit var binding: KonumFragmentBinding | ||
|
||
public lateinit var locationManager: LocationManager | ||
public lateinit var locationListener: LocationListener | ||
|
||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | ||
binding = KonumFragmentBinding.inflate(layoutInflater) | ||
return binding.root | ||
} | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
super.onViewCreated(view, savedInstanceState) | ||
|
||
locationManager = requireContext().getSystemService(Context.LOCATION_SERVICE) as LocationManager | ||
LocationListener { konum -> | ||
binding.konumText.text = "konum » ${konum.latitude.toString()},${konum.longitude.toString()}" | ||
Log.d(logTag, binding.konumText.text.toString()) | ||
}.also { locationListener = it } | ||
|
||
if (ContextCompat.checkSelfPermission(requireContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { | ||
// ? Konum izni verilmemiÅŸse izin iste | ||
ActivityCompat.requestPermissions(requireActivity(), arrayOf(Manifest.permission.ACCESS_FINE_LOCATION), 1) | ||
} else { | ||
// ? Konum izni verilmişse konum güncellemelerini başlat | ||
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1, 1f, locationListener) | ||
|
||
val sonBilinenKonum = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) | ||
binding.konumText.text = "sonBilinenKonum » ${sonBilinenKonum?.latitude.toString()},${sonBilinenKonum?.longitude.toString()}" | ||
Log.d(logTag, binding.konumText.text.toString()) | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:aapt="http://schemas.android.com/aapt" | ||
android:width="108dp" | ||
android:height="108dp" | ||
android:viewportWidth="108" | ||
android:viewportHeight="108"> | ||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> | ||
<aapt:attr name="android:fillColor"> | ||
<gradient | ||
android:endX="85.84757" | ||
android:endY="92.4963" | ||
android:startX="42.9492" | ||
android:startY="49.59793" | ||
android:type="linear"> | ||
<item | ||
android:color="#44000000" | ||
android:offset="0.0" /> | ||
<item | ||
android:color="#00000000" | ||
android:offset="1.0" /> | ||
</gradient> | ||
</aapt:attr> | ||
</path> | ||
<path | ||
android:fillColor="#FFFFFF" | ||
android:fillType="nonZero" | ||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" | ||
android:strokeWidth="1" | ||
android:strokeColor="#00000000" /> | ||
</vector> |
Oops, something went wrong.