Skip to content

Commit 24af4a2

Browse files
author
viktorholk
authored
Merge pull request #2 from viktorholk/develop
App redesign & configurable poll timer
2 parents 1227fc6 + f8f7c9f commit 24af4a2

File tree

63 files changed

+1044
-703
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1044
-703
lines changed

Diff for: README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
## API Push Notifications
2-
Send mobile push notifications through a REST API.<br>
3-
4-
You can already install the offical [Android](https://play.google.com/store/apps/details?id=com.viktorholk.apipushnotifications) app on Google Play, or you can work with the source code and install your own apk.
1+
## Push Notifications API
2+
PNA is a simple development tool for displaying notifications created through a custom API.
3+
...

Diff for: android/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
/build
1212
/captures
1313
.externalNativeBuild
14+
.cxx
15+
local.properties

Diff for: android/app/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/build
1+
/build

Diff for: android/app/build.gradle

+25-14
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,41 @@
1-
apply plugin: 'com.android.application'
1+
plugins {
2+
id 'com.android.application'
3+
}
24

35
android {
4-
compileSdkVersion 29
5-
buildToolsVersion "30.0.2"
6+
compileSdk 32
7+
68
defaultConfig {
7-
applicationId "com.viktorholk.apipushnotifications"
8-
minSdkVersion 26
9-
targetSdkVersion 29
9+
applicationId "com.viktorholk.pushnotificationsapi"
10+
minSdk 26
11+
targetSdk 32
1012
versionCode 1
1113
versionName "1.0"
14+
1215
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1316
}
17+
1418
buildTypes {
1519
release {
1620
minifyEnabled false
1721
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
1822
}
1923
}
24+
compileOptions {
25+
coreLibraryDesugaringEnabled true
26+
sourceCompatibility JavaVersion.VERSION_1_8
27+
targetCompatibility JavaVersion.VERSION_1_8
28+
}
2029
}
2130

2231
dependencies {
23-
implementation fileTree(dir: 'libs', include: ['*.jar'])
24-
implementation 'androidx.appcompat:appcompat:1.2.0'
25-
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
26-
implementation 'com.android.volley:volley:1.1.1'
27-
testImplementation 'junit:junit:4.12'
28-
androidTestImplementation 'androidx.test:runner:1.3.0'
29-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
30-
}
32+
33+
implementation 'androidx.appcompat:appcompat:1.4.0'
34+
implementation 'com.google.android.material:material:1.4.0'
35+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
36+
implementation 'com.android.volley:volley:1.2.0'
37+
testImplementation 'junit:junit:4.+'
38+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
39+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
40+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
41+
}

Diff for: android/app/proguard-rules.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818

1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
21+
#-renamesourcefileattribute SourceFile

Diff for: android/app/src/androidTest/java/com/viktorholk/apipushnotifications/ExampleInstrumentedTest.java renamed to android/app/src/androidTest/java/com/viktorholk/pushnotificationsapi/ExampleInstrumentedTest.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package com.viktorholk.apipushnotifications;
1+
package com.viktorholk.pushnotificationsapi;
22

33
import android.content.Context;
44

5-
import androidx.test.InstrumentationRegistry;
6-
import androidx.test.runner.AndroidJUnit4;
5+
import androidx.test.platform.app.InstrumentationRegistry;
6+
import androidx.test.ext.junit.runners.AndroidJUnit4;
77

88
import org.junit.Test;
99
import org.junit.runner.RunWith;
@@ -20,8 +20,7 @@ public class ExampleInstrumentedTest {
2020
@Test
2121
public void useAppContext() {
2222
// Context of the app under test.
23-
Context appContext = InstrumentationRegistry.getTargetContext();
24-
25-
assertEquals("com.tactoctical.apipushnotifications", appContext.getPackageName());
23+
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24+
assertEquals("com.viktorholk.pushnotificationsapi", appContext.getPackageName());
2625
}
27-
}
26+
}

Diff for: android/app/src/main/AndroidManifest.xml

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.viktorholk.apipushnotifications">
3+
package="com.viktorholk.pushnotificationsapi">
4+
<uses-permission android:name="android.permission.INTERNET"/>
45
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
5-
<uses-permission android:name="android.permission.INTERNET" />
6+
<uses-permission android:name="android.permission.VIBRATE" />
67

78
<application
89
android:allowBackup="true"
910
android:icon="@mipmap/ic_launcher"
1011
android:label="@string/app_name"
1112
android:roundIcon="@mipmap/ic_launcher_round"
1213
android:supportsRtl="true"
13-
android:theme="@style/AppTheme"
14-
android:networkSecurityConfig="@xml/network_security_config">
14+
android:theme="@style/Theme.PushNotificationsAPI"
15+
android:usesCleartextTraffic="true">
16+
1517
<service
16-
android:name="com.viktorholk.apipushnotifications.AppService"
18+
android:name="com.viktorholk.pushnotificationsapi.NotificationService"
1719
android:enabled="true"
1820
android:exported="false"/>
1921

20-
<activity android:name="com.viktorholk.apipushnotifications.OptionsActivity"
21-
android:screenOrientation="portrait"/>
22-
<activity android:name="com.viktorholk.apipushnotifications.MainActivity"
22+
<activity
23+
android:name=".MainActivity"
24+
android:exported="true"
2325
android:screenOrientation="portrait">
2426
<intent-filter>
25-
<action android:name="android.intent.action.VIEW" />
2627
<action android:name="android.intent.action.MAIN" />
2728
<category android:name="android.intent.category.LAUNCHER" />
2829
</intent-filter>

Diff for: android/app/src/main/ic_launcher-playstore.png

-218 Bytes
Loading

Diff for: android/app/src/main/java/com/viktorholk/apipushnotifications/AppService.java

-136
This file was deleted.

Diff for: android/app/src/main/java/com/viktorholk/apipushnotifications/MainActivity.java

-107
This file was deleted.

0 commit comments

Comments
 (0)