Skip to content

Commit 19b4c8d

Browse files
Whatsapp Extension for Dashclock with NotificationListenerService
1 parent b38fc4d commit 19b4c8d

18 files changed

Lines changed: 855 additions & 0 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="it.gmariotti.android.examples.dashclock.extensions.wsa2"
3+
android:versionCode="1"
4+
android:versionName="1.0" >
5+
6+
<uses-sdk
7+
android:minSdkVersion="18"
8+
android:targetSdkVersion="18" />
9+
10+
<application
11+
android:allowBackup="true"
12+
android:label="@string/app_name"
13+
android:icon="@drawable/ic_launcher"
14+
android:theme="@android:style/Theme.Holo.Light.DarkActionBar" >
15+
<service
16+
android:name=".WhtsExtension"
17+
android:icon="@drawable/ic_extension_whts"
18+
android:label="@string/extension_title"
19+
android:permission="com.google.android.apps.dashclock.permission.READ_EXTENSION_DATA" >
20+
<intent-filter>
21+
<action android:name="com.google.android.apps.dashclock.Extension" />
22+
</intent-filter>
23+
24+
<meta-data
25+
android:name="protocolVersion"
26+
android:value="1" />
27+
<meta-data
28+
android:name="description"
29+
android:value="@string/extension_description" />
30+
<!-- A settings activity -->
31+
<meta-data
32+
android:name="settingsActivity"
33+
android:value=".WhtsSettingsActivity" />
34+
</service>
35+
36+
<service
37+
android:name="it.gmariotti.android.examples.dashclock.extensions.wsa2.WhtsNotificationListener"
38+
android:label="@string/service_name"
39+
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" >
40+
<intent-filter>
41+
<action android:name="android.service.notification.NotificationListenerService" />
42+
</intent-filter>
43+
44+
</service>
45+
46+
<activity
47+
android:name=".WhtsSettingsActivity"
48+
android:exported="true"
49+
android:label="@string/extension_titlePref" />
50+
51+
</application>
52+
53+
54+
</manifest>
5.38 KB
Loading
3.12 KB
Loading
1.63 KB
Loading
8.01 KB
Loading
14.6 KB
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<resources>
2+
3+
<!--
4+
Base application theme for API 11+. This theme completely replaces
5+
AppBaseTheme from res/values/styles.xml on API 11+ devices.
6+
-->
7+
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
8+
<!-- API 11 theme customizations can go here. -->
9+
</style>
10+
11+
</resources>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<resources>
2+
3+
<!--
4+
Base application theme for API 14+. This theme completely replaces
5+
AppBaseTheme from BOTH res/values/styles.xml and
6+
res/values-v11/styles.xml on API 14+ devices.
7+
-->
8+
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
9+
<!-- API 14 theme customizations can go here. -->
10+
</style>
11+
12+
</resources>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<resources>
2+
3+
<string name="app_name">DashClock Whatsapp Extension</string>
4+
5+
<!-- DashClock config -->
6+
<string name="extension_title">Whatsapp Notifications</string>
7+
<string name="extension_description">Display Whatsapp notifications</string>
8+
<string name="extension_titlePref">Settings</string>
9+
10+
<!-- Service Listener -->
11+
<string name="service_name">Dashclock Whatsapp Extension Listener</string>
12+
13+
<!-- DashClock setting -->
14+
<string name="pref_config">Config</string>
15+
<string name="pref_config_setting">Enable Notifications</string>
16+
<string name="pref_config_setting_summary">You have to enable notifications listener in Android Setting\'s menu</string>
17+
18+
<!-- DashClock strings -->
19+
<plurals name="notifications">
20+
<item quantity="zero">No Notifications</item>
21+
<item quantity="one">1 new message</item>
22+
<item quantity="two">Two new messages</item>
23+
<item quantity="few">Few new messages</item>
24+
<item quantity="many">Many new messages</item>
25+
<item quantity="other">%d new messages</item>
26+
</plurals>
27+
</resources>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<resources>
2+
3+
<!--
4+
Base application theme, dependent on API level. This theme is replaced
5+
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
6+
-->
7+
<style name="AppBaseTheme" parent="android:Theme.Light">
8+
<!--
9+
Theme customizations available in newer API levels can go in
10+
res/values-vXX/styles.xml, while customizations related to
11+
backward-compatibility can go here.
12+
-->
13+
</style>
14+
15+
<!-- Application theme. -->
16+
<style name="AppTheme" parent="AppBaseTheme">
17+
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
18+
</style>
19+
20+
</resources>

0 commit comments

Comments
 (0)