Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Jetpack Compose #44

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
85b4a5d
add composables OpenDialerApp CallsScreen, CallDetailScreen, Contacts…
oxcened Dec 8, 2023
f5479d4
feat(calls): add runtime permissions prompt
oxcened Oct 5, 2024
49680fc
feat(contacts): add runtime permissions prompt
oxcened Oct 5, 2024
04625b1
feat(calls): add cache invalidation
oxcened Oct 5, 2024
b5b875d
feat(searchContacts): new compose screen
oxcened Oct 7, 2024
5816339
feat(inCall): add InCallScreen
oxcened Oct 9, 2024
745465f
feat: migrate jetpack navigation to compose navigation
oxcened Oct 10, 2024
fd6af05
chore: remove unused activities, fragments, views, resources
oxcened Oct 27, 2024
bc6e5bd
refactor(app): use enum instead of string
oxcened Oct 27, 2024
b95d145
chore: reformat code
oxcened Oct 27, 2024
dce023f
feat(settings): add SettingsScreen
oxcened Oct 27, 2024
77f2373
chore(settings): remove unused resources
oxcened Oct 27, 2024
cd59886
fix: app theme
oxcened Oct 27, 2024
b5abc42
fix(contactsSearch): dialpad color
oxcened Oct 27, 2024
76287a8
fix(contactsSearch): add missing click handler on contact
oxcened Oct 27, 2024
5eb8b66
feat(app): setup material theme
oxcened Oct 27, 2024
97c0435
refactor(contactsSearch): add DigitButton"
oxcened Oct 27, 2024
9df0b8f
refactor: change color of placeholders to primary"
oxcened Oct 27, 2024
a7d752b
refactor(app): remove unnecessary brackets"
oxcened Oct 27, 2024
68c71cd
refactor(calls): Divider becomes HorizontalDivider
oxcened Oct 27, 2024
61aa6c0
feat(inCall): add dtmf dialpad
oxcened Oct 27, 2024
227ec14
chore: delete xml files
oxcened Oct 27, 2024
5fb96a1
feat: handle intents ACTION_DIAL and ACTION_VIEW
oxcened Oct 28, 2024
e111e3c
feat(contactsSearch): add quick actions to result list bottom
oxcened Nov 2, 2024
443287a
fix(callDetail): pop back stack on delete success
oxcened Nov 2, 2024
102f1e8
fix(calls): add contentPadding to avoid fab overlapping calls list
oxcened Nov 2, 2024
b8629bd
feat(contacts): change contact image placeholder color"
oxcened Nov 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +25,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
22 changes: 11 additions & 11 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
11 changes: 7 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ You may contribute to OpenDialer in many ways:

## Creating issues

Before you create a new issue, please do a search in open issues to see if the issue or feature request has already been filed.
Before you create a new issue, please do a search in open issues to see if the issue or feature
request has already been filed.

## Reporting bugs

Please open one issue per bug report. Be as detailed as you can in order to increase chances that the bug gets fixed.
Please open one issue per bug report. Be as detailed as you can in order to increase chances that
the bug gets fixed.

## Confirming bugs

Expand All @@ -20,7 +22,7 @@ Please comment only if you have valuable info that can help debugging.

## Requesting features

Please open one issue per feature request.
Please open one issue per feature request.

Describe as best as you can the feature you'd like to see implemented.

Expand All @@ -38,4 +40,5 @@ Feel free to give feedback on someone else's PR.

## Translating

If you are interested in contributing to translations, you can do so in the [Crowdin project](https://crowdin.com/project/opendialer).
If you are interested in contributing to translations, you can do so in
the [Crowdin project](https://crowdin.com/project/opendialer).
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ An open, clean and modern dialer for Android.

## Build and Run

**OpenDialer** uses the Gradle build system and can be imported directly into Android Studio (make sure you are using the latest stable version available [here](https://developer.android.com/studio)).
**OpenDialer** uses the Gradle build system and can be imported directly into Android Studio (make
sure you are using the latest stable version
available [here](https://developer.android.com/studio)).

Change the run configuration to `app`.

![image](docs/images/android_studio_build.png)

The app contains the usual `debug` and `release` build variants which can be built and run.
The app contains the usual `debug` and `release` build variants which can be built and run.

![image](docs/images/android_studio_build_variant.png)

Expand All @@ -59,7 +61,9 @@ together to create a complete app.

## Modularization

The **OpenDialer** app has been fully modularized based on the [official recommendations](https://developer.android.com/topic/modularization/patterns) and you can find the
The **OpenDialer** app has been fully modularized based on
the [official recommendations](https://developer.android.com/topic/modularization/patterns) and you
can find the
description of the modularization strategy used in
[modularization learning journey](./docs/ModularizationLearningJourney.md).

Expand Down
21 changes: 20 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
id 'kotlin-kapt'
id 'androidx.navigation.safeargs.kotlin'
id 'com.google.dagger.hilt.android'
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kotlin.serialization)
}

def keystorePropertiesFile = rootProject.file("keystore.properties")
Expand Down Expand Up @@ -50,6 +52,7 @@ android {
}
buildFeatures {
viewBinding true
compose true
}
namespace 'dev.alenajam.opendialer'
lint {
Expand All @@ -58,6 +61,9 @@ android {
compileOptions {
coreLibraryDesugaringEnabled true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.2"
}
}

dependencies {
Expand Down Expand Up @@ -96,7 +102,7 @@ dependencies {

implementation 'com.google.dagger:hilt-android:2.48.1'
kapt 'com.google.dagger:hilt-compiler:2.48.1'
androidTestImplementation 'com.google.dagger:hilt-android-testing:2.48.1'
androidTestImplementation 'com.google.dagger:hilt-android-testing:2.48.1'
kaptAndroidTest 'com.google.dagger:hilt-compiler:2.48.1'
testImplementation 'com.google.dagger:hilt-android-testing:2.48.1'
kaptTest 'com.google.dagger:hilt-compiler:2.48.1'
Expand All @@ -105,6 +111,19 @@ dependencies {

testImplementation 'junit:junit:4.13.2'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

def composeBom = platform('androidx.compose:compose-bom:2024.09.03')
implementation composeBom
androidTestImplementation composeBom
implementation(libs.androidx.material3)
implementation 'androidx.compose.ui:ui-tooling-preview'
debugImplementation 'androidx.compose.ui:ui-tooling'
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
implementation 'androidx.compose.material:material-icons-extended'
implementation "androidx.compose.ui:ui-viewbinding"
implementation(libs.navigation.compose)
implementation(libs.kotlinx.serialization)
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package dev.alenajam.opendialer;

import static org.junit.Assert.assertEquals;

import android.content.Context;

import androidx.test.ext.junit.runners.AndroidJUnit4;
Expand All @@ -8,20 +10,18 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertEquals;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

assertEquals("dev.alenajam.opendialer", appContext.getPackageName());
}
assertEquals("dev.alenajam.opendialer", appContext.getPackageName());
}
}
25 changes: 2 additions & 23 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/Theme.OpenDialer">

<activity
android:name=".feature.inCall.ui.InCallActivity"
Expand All @@ -33,19 +33,9 @@
android:screenOrientation="portrait" />

<activity
android:name=".feature.settings.SettingsActivity"
android:label="@string/option"
android:parentActivityName="dev.alenajam.opendialer.features.main.MainActivity"
android:theme="@style/PreferenceTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="dev.alenajam.opendialer.features.main.MainActivity" />
</activity>
<activity
android:name="dev.alenajam.opendialer.features.main.MainActivity"
android:name="dev.alenajam.opendialer.ui.MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/AppTheme.Main"
android:windowSoftInputMode="adjustNothing">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -66,17 +56,6 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".feature.settings.AboutActivity"
android:label="@string/info"
android:parentActivityName="dev.alenajam.opendialer.features.main.MainActivity"
android:theme="@style/AppTheme.NoActionBar" />


<activity
android:name=".feature.settings.CustomizeQuickResponsesActivity"
android:parentActivityName=".feature.settings.SettingsActivity" />


<service
android:name=".feature.inCall.service.InCallServiceImpl"
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/dev/alenajam/opendialer/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
@HiltAndroidApp
public class App extends Application {

@Override
public void onCreate() {
super.onCreate();
NotificationHelper.setupNotificationChannels(this);
SharedPreferenceHelper.init(this);
}
@Override
public void onCreate() {
super.onCreate();
NotificationHelper.setupNotificationChannels(this);
SharedPreferenceHelper.init(this);
}
}
Loading
Loading