-
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
1 parent
90dc78a
commit 3231106
Showing
21 changed files
with
177,186 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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,20 @@ | ||
{ | ||
"version": 3, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "ren.imyan.app_tracker", | ||
"variantName": "release", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"attributes": [], | ||
"versionCode": 2, | ||
"versionName": "0.0.2", | ||
"outputFile": "app-release.apk" | ||
} | ||
], | ||
"elementType": "File" | ||
} |
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
28 changes: 28 additions & 0 deletions
28
app/src/main/java/ren/imyan/app_tracker/common/ktx/BitmapKtx.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,28 @@ | ||
package ren.imyan.app_tracker.common.ktx | ||
|
||
import android.content.Context | ||
import android.graphics.Bitmap | ||
import java.io.ByteArrayOutputStream | ||
import java.io.File | ||
import java.io.FileOutputStream | ||
|
||
fun Bitmap.toFile(fileName:String):File?{ | ||
var file: File? = null | ||
return try { | ||
file = File(get<Context>().cacheDir.path+File.separator+fileName) | ||
file.createNewFile() | ||
|
||
ByteArrayOutputStream().use { | ||
this.compress(Bitmap.CompressFormat.JPEG,80,it) | ||
val bitmapData = it.toByteArray() | ||
FileOutputStream(file).use { fos-> | ||
fos.write(bitmapData) | ||
fos.flush() | ||
fos.close() | ||
file | ||
} | ||
} | ||
}catch (e:Exception){ | ||
file | ||
} | ||
} |
12 changes: 8 additions & 4 deletions
12
app/src/main/java/ren/imyan/app_tracker/net/AppTrackerApi.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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package ren.imyan.app_tracker.net | ||
|
||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody | ||
import ren.imyan.app_tracker.net.request.SubmitAppRequest | ||
import retrofit2.Response | ||
import retrofit2.http.Body | ||
import retrofit2.http.POST | ||
import retrofit2.http.* | ||
|
||
interface AppTrackerApi { | ||
@POST("new") | ||
suspend fun submitApp(@Body appInfo: SubmitAppRequest): Response<Unit> | ||
@POST("appInfo") | ||
suspend fun submitAppInfo(@Body appInfo: SubmitAppRequest): Response<Unit> | ||
|
||
@POST("appIcon") | ||
suspend fun submitAppIcon(@Query("packageName") packageName:String,@Body icon: RequestBody):Response<Unit> | ||
} |
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
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
32 changes: 32 additions & 0 deletions
32
app/src/main/java/ren/imyan/app_tracker/ui/AboutActivity.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,32 @@ | ||
package ren.imyan.app_tracker.ui | ||
|
||
import android.content.Intent | ||
import android.net.Uri | ||
import android.os.Bundle | ||
import android.widget.Button | ||
import android.widget.TextView | ||
import androidx.appcompat.app.AppCompatActivity | ||
import ren.imyan.app_tracker.R | ||
|
||
class AboutActivity:AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.action_about) | ||
|
||
findViewById<TextView>(R.id.textView2).setOnClickListener { | ||
val intent = Intent().apply { | ||
action = Intent.ACTION_VIEW | ||
data = Uri.parse("https://github.com/Oblatum/App-Tracker-for-Icon-Pack-Client-Side-Android-Version"); | ||
} | ||
startActivity(intent) | ||
} | ||
|
||
findViewById<Button>(R.id.ali).setOnClickListener { | ||
val intent = Intent().apply { | ||
action = Intent.ACTION_VIEW | ||
data = Uri.parse("https://qr.alipay.com/fkx11504wccj8dgl2dc41d1"); | ||
} | ||
startActivity(intent) | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.