-
-
Notifications
You must be signed in to change notification settings - Fork 21
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 #331 from you-apps/dialer
[WIP] feat: inbuilt dialer including call history
- Loading branch information
Showing
28 changed files
with
1,516 additions
and
52 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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.bnyro.contacts.ext | ||
|
||
fun String.removeLastChar(): String { | ||
return if (isEmpty()) this | ||
else substring(0, length - 1) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.bnyro.contacts.obj | ||
|
||
data class CallLogEntry( | ||
val phoneNumber: String, | ||
val type: Int, | ||
val time: Long, | ||
val duration: Long | ||
) |
23 changes: 23 additions & 0 deletions
23
app/src/main/java/com/bnyro/contacts/receivers/CallActionReceiver.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,23 @@ | ||
package com.bnyro.contacts.receivers; | ||
|
||
import android.content.BroadcastReceiver | ||
import android.content.Context | ||
import android.content.Intent | ||
import com.bnyro.contacts.util.CallManager | ||
|
||
class CallActionReceiver : BroadcastReceiver() { | ||
override fun onReceive(context: Context, intent: Intent) { | ||
when (intent.action) { | ||
ACCEPT_CALL -> { | ||
CallManager.acceptCall() | ||
} | ||
|
||
DECLINE_CALL -> CallManager.cancelCall() | ||
} | ||
} | ||
|
||
companion object { | ||
const val ACCEPT_CALL = "com.bnyro.contacts.accept_call" | ||
const val DECLINE_CALL = "com.bnyro.contacts.decline_call" | ||
} | ||
} |
Oops, something went wrong.