Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ojhdt/develop
v1.2
- Loading branch information
Showing
97 changed files
with
1,895 additions
and
765 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 |
---|---|---|
|
@@ -14,3 +14,5 @@ | |
.cxx | ||
local.properties | ||
/app/release | ||
app/release/app-release.apk | ||
app/release/output-metadata.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/ojhdtapp/action/logic/NotificationActionReceiver.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,27 @@ | ||
package com.ojhdtapp.action.logic | ||
|
||
import android.content.BroadcastReceiver | ||
import android.content.Context | ||
import android.content.Intent | ||
import android.util.Log | ||
import android.widget.Toast | ||
import com.ojhdtapp.action.BaseApplication | ||
import com.ojhdtapp.action.R | ||
import com.ojhdtapp.action.util.NotificationUtil | ||
|
||
class NotificationActionReceiver : BroadcastReceiver() { | ||
override fun onReceive(context: Context?, intent: Intent?) { | ||
val action = intent?.action | ||
val actionId = intent?.getLongExtra("action_id", -1) | ||
Log.d("aaa", actionId.toString()) | ||
if (action == NotificationUtil.ACTION_FINISHED && !actionId!!.equals(-1)) { | ||
Log.d("aaa", "action finished tap") | ||
NotificationUtil.cancelAction(actionId.toInt()) | ||
Toast.makeText(BaseApplication.context, R.string.notification_finished_action_toast, Toast.LENGTH_SHORT).show() | ||
} else if (action == NotificationUtil.ACTION_IGNORED && !actionId!!.equals(-1)) { | ||
NotificationUtil.cancelAction(actionId.toInt()) | ||
Log.d("aaa", "action ignored tap") | ||
Toast.makeText(BaseApplication.context, R.string.notification_ignored_action_toast, Toast.LENGTH_SHORT).show() | ||
} | ||
} | ||
} |
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
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/ojhdtapp/action/logic/dao/AchievementDao.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,29 @@ | ||
package com.ojhdtapp.action.logic.dao | ||
|
||
import androidx.lifecycle.LiveData | ||
import androidx.room.* | ||
import com.ojhdtapp.action.logic.model.Achievement | ||
|
||
@Dao | ||
interface AchievementDao { | ||
@Insert | ||
fun insertAchievement(achievement: Achievement): Long | ||
|
||
@Delete | ||
fun deleteAchievement(achievement: Achievement) | ||
|
||
@Update | ||
fun updateAchievement(newAchievement: Achievement) | ||
|
||
@Query("DELETE FROM achievement_table") | ||
fun deleteAll() | ||
|
||
@Query("SELECT * FROM achievement_table") | ||
fun loadAllAchievement(): List<Achievement> | ||
|
||
@Query("SELECT * FROM achievement_table") | ||
fun loadAllAchievementLive(): LiveData<List<Achievement>> | ||
|
||
@Query("SELECT 1 FROM achievement_table WHERE title = :title LIMIT 1") | ||
fun isStored(title: String): Boolean | ||
} |
Oops, something went wrong.