{"id":382,"date":"2016-09-01T15:32:35","date_gmt":"2016-09-01T20:02:35","guid":{"rendered":"http:\/\/blog.thescorpius.com\/?p=382"},"modified":"2017-01-22T12:06:27","modified_gmt":"2017-01-22T16:36:27","slug":"pebble-app-notification-filters","status":"publish","type":"post","link":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/","title":{"rendered":"Pebble App Modding to Include Notification Filters"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg\" rel=\"attachment wp-att-426\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg?resize=648%2C365\" alt=\"Pebble getting filters for notifications\" width=\"648\" height=\"365\" class=\"alignnone size-full wp-image-426\" srcset=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg?w=870&amp;ssl=1 870w, https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg?resize=768%2C433&amp;ssl=1 768w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/a>&nbsp;<br \/>\n<strong>UPDATE 01\/22\/2017: You can find a modded 4.3.0 version with the modifications from this post clicking <a href=\"https:\/\/s3.amazonaws.com\/thescorpiusblog\/Pebble-4.3.0-modded-by-Scorpius.apk\">here<\/a>.<\/strong><\/p>\n<p>I really like my Pebble. Also, I really like notifications on my Pebble. But I really hate that I can&#8217;t filter those annoying WhatsApp groups notifications in my Pebble without losing all my WhatsApp notifications. The Pebble really needs a notification filtering system.<\/p>\n<p>Most people solve this problem by\u00a0deactivating the stock notifications and installing a third-party application for that. But usually, those applications are really slow sending the notifications and lose\u00a0a lot of them. I tried several but I didn&#8217;t like any of them. So I decided I wanted the stock notifications but with regular expression filtering\u00a0and went ahead to modify the original Pebble application for Android.<\/p>\n<p><!--more--><\/p>\n<p>Basically what I needed is to check the notification against some regular expressions\u00a0before the Pebble application sends it to the watch. An Android application needs to\u00a0create a <code><a href=\"https:\/\/developer.android.com\/reference\/android\/service\/notification\/NotificationListenerService.html\">NotificationListenerService<\/a><\/code>\u00a0in order to get the notifications from the phone, and implement the method <code><a href=\"https:\/\/developer.android.com\/reference\/android\/service\/notification\/NotificationListenerService.html#onNotificationPosted(android.service.notification.StatusBarNotification)\">onNotificationPosted<\/a><\/code> to receive the notification and\u00a0process it. We&#8217;re going to find where this is using a <a href=\"https:\/\/github.com\/skylot\/jadx\">Dex to Java decompiler<\/a>\u00a0called <a href=\"https:\/\/github.com\/skylot\/jadx\">jadx<\/a>.<\/p>\n<p>For this article we&#8217;re going to use the Pebble for Android v4.0.0-1209-98b6e71.<\/p>\n<p style=\"text-align: left;\">Now we look for the method\u00a0<code><a href=\"https:\/\/developer.android.com\/reference\/android\/service\/notification\/NotificationListenerService.html#onNotificationPosted(android.service.notification.StatusBarNotification)\">onNotificationPosted<\/a><\/code>\u00a0to see where it is implemented using the search button on jadx. We can find it quickly in the class <code>com.getpebble.android.notifications.PblNotificationService<\/code>:<\/p>\n<pre class=\"lang:java decode:true\">public void onNotificationPosted(StatusBarNotification statusBarNotification) {\r\n    if (statusBarNotification == null) {\r\n        try {\r\n            z.b(\"PblNotificationService\", \"onNotificationPosted: sbn is null\");\r\n        } catch (Throwable e) {\r\n            z.a(\"PblNotificationService\", \"Error handling notification\", e);\r\n            l.a(\"PblNotificationService\", false, e);\r\n        } catch (Throwable e2) {\r\n            z.a(\"PblNotificationService\", \"Unrecoverable error occurred handling notification\", e2);\r\n            l.a(\"PblNotificationService\", true, e2);\r\n        }\r\n    } else {\r\n        z.d(\"PblNotificationService\", \"onNotificationPosted(\" + statusBarNotification + \")\");\r\n        com.getpebble.android.bluetooth.b.d.a(new b(this, statusBarNotification));\r\n        z.e(\"PblNotificationService\", \"end onNotificationPosted id = \" + statusBarNotification.getId());\r\n    }\r\n}<\/pre>\n<p>This is a little obfuscated but it&#8217;s still very readable. You can immediately realize that <code>z.d()<\/code> is used for logging, and the notification is processed in a thread defined in the class\u00a0<code>com.getpebble.android.notifications.b() <\/code>before sending it via BlueTooth to the watch. This class\u00a0<code>b<\/code> has just one method called\u00a0<code>run<\/code>:<\/p>\n<pre class=\"lang:java decode:true\">public void run() {\r\n    l.a(this.b.getApplicationContext(), false);\r\n    o a = o.a(this.a, s.NOTIFICATION, System.currentTimeMillis());\r\n    String g = a.g();\r\n    if (!(TextUtils.isEmpty(g) || a.o() || g.equals(\"com.getpebble.android.basalt\"))) {\r\n        cf.a(g, System.currentTimeMillis(), PebbleApplication.D().getContentResolver());\r\n    }\r\n    e.a(a);\r\n}<\/pre>\n<p>The\u00a0class\u00a0<code>o<\/code> is the notification\u00a0parsed and the class\u00a0<code>e<\/code> will process it. This class belongs to:<\/p>\n<pre class=\"lang:java decode:true\">import com.getpebble.android.framework.i.e;<\/pre>\n<p>And that&#8217;s finally what we were looking for. This class is where the application decides to send the notification to the watch depending on things like quiet time, or if the application that is sending the notification is not selected by the user, etc. Eventually we reach this code in the method <code>d<\/code>:<\/p>\n<pre class=\"lang:java decode:true\">de parseRecordFrom = dd.parseRecordFrom(oVar);\r\neq a2 = a(a(oVar, parseRecordFrom.notificationUuid));\r\nif (oVar.p()) {\r\n    z.d(\"PebbleNotificationProcessor\", \"Notification is duplicate; skipping\");\r\n    dd.markAsDup(PebbleApplication.D().getContentResolver(), parseRecordFrom.notificationUuid);\r\n    a(oVar, false);\r\n} else if (m.a(oVar)) {\r\n     z.d(\"PebbleNotificationProcessor\", \"Notification is calendar invite via gmail; not sending notification\");\r\n     a(oVar, false);\r\n} else {\r\n     z.d(\"PebbleNotificationProcessor\", \"sending timelineModel to Pebble.\");\r\n     if (a(a2)) {\r\n         b(parseRecordFrom);\r\n         a(oVar, parseRecordFrom);\r\n         a(oVar, true);\r\n     } else {\r\n         a(oVar, false);\r\n     }\r\n}<\/pre>\n<p>Let&#8217;s change that to:<\/p>\n<pre class=\"lang:java decode:true\">if (oVar.p()) {\r\n    z.d(\"PebbleNotificationProcessor\", \"Notification is duplicate; skipping\");\r\n    dd.markAsDup(PebbleApplication.D().getContentResolver(), parseRecordFrom.notificationUuid);\r\n    a(oVar, false);\r\n} else if (hacks.matchesExcludeList(parseRecordFrom.androidPackageName, parseRecordFrom.title, parseRecordFrom.body)) {\r\n    z.d(\"PebbleNotificationProcessor\", \"Notification title\/body matches an exclude string; skipping\");\r\n    a(oVar, false);\r\n} else if (m.a(oVar)) {<\/pre>\n<p>Just adding our new check there that if the notification matches and exclude list, it won&#8217;t be sent to the watch.<\/p>\n<p>Now how can we do that? It&#8217;s not like we can compile all this code again in Java and then convert it to Dalvik. We have to modify\u00a0this class in assembler, and that&#8217;s the fun part of it!<\/p>\n<p>First install <a class=\"\" href=\"https:\/\/ibotpeaches.github.io\/Apktool\/\">apktool<\/a>\u00a0(if you use Debian it&#8217;s as easy as apt-get install apktool) and unpack the apk:<\/p>\n<pre class=\"lang:terminal decode:true\">naikel@debian ~\/Pebble $ apktool d original\/Pebble_4.0.0-1209-98b6e71.apk \r\nI: Using Apktool 2.2.0-dirty on Pebble_4.0.0-1209-98b6e71.apk\r\nI: Loading resource table...\r\nI: Decoding AndroidManifest.xml with resources...\r\nI: Loading resource table from file: \/home\/naikel\/.local\/share\/apktool\/framework\/1.apk\r\nI: Regular manifest package...\r\nI: Decoding file-resources...\r\nI: Decoding values *\/* XMLs...\r\nI: Baksmaling classes.dex...\r\nI: Copying assets and libs...\r\nI: Copying unknown files...\r\nI: Copying original files...\r\n<\/pre>\n<p>And then modify the smali file for\u00a0<code>com.getpebble.android.framework.i.e<\/code>. First raise the number of registers in the method:<\/p>\n<pre>.method public declared-synchronized d(Lcom\/getpebble\/android\/notifications\/a\/o;)V\r\n    .locals 8<\/pre>\n<p>And then before checking the next condition in the <code>if<\/code> above:<\/p>\n<pre class=\"\">    if-eqz v2, :cond_3\r\n\r\n    .line 222\r\n    const-string v1, \"PebbleNotificationProcessor\"\r\n    const-string v2, \"Notification is duplicate; skipping\"\r\n    invoke-static {v1, v2}, Lcom\/getpebble\/android\/common\/b\/a\/z;->;d(Ljava\/lang\/String;Ljava\/lang\/String;)V<\/pre>\n<p>We change that jump to our code:<\/p>\n<pre>    if-eqz v2, :cond_5150<\/pre>\n<p>Here&#8217;s our code in smali for the check above:<\/p>\n<pre>    :cond_5150\r\n    iget-object v7, v0, Lcom\/getpebble\/android\/common\/model\/de;->androidPackageName:Ljava\/lang\/String;\r\n    iget-object v4, v0, Lcom\/getpebble\/android\/common\/model\/de;->title:Ljava\/lang\/String;\r\n    iget-object v5, v0, Lcom\/getpebble\/android\/common\/model\/de;->body:Ljava\/lang\/String;\r\n    invoke-static {v7, v4, v5}, Lcom\/scorpius\/hacks;->matchesExcludeList(Ljava\/lang\/String;Ljava\/lang\/String;Ljava\/lang\/String;)Z\r\n    move-result v6\r\n    if-eqz v6, :cond_3\r\n    const-string v0, \"PebbleNotificationProcessor\"\r\n    const-string v1, \"Notification title\/body matches an exclude string; skipping\"\r\n    invoke-static {v0, v1}, Lcom\/getpebble\/android\/common\/b\/a\/z;->d(Ljava\/lang\/String;Ljava\/lang\/String;)V\r\n    const\/4 v0, 0x0\r\n    invoke-virtual {p0, p1, v0}, Lcom\/getpebble\/android\/framework\/i\/e;->a(Lcom\/getpebble\/android\/notifications\/a\/o;Z)V\r\n    goto :goto_0<\/pre>\n<p>And now you can define the static method <code>com.scorpius.hacks.matchesExcludeList<\/code> however you want.\u00a0This time you can write it in Java. This is what I did: I put all my rules in regular expressions in a file in \/sdcard\/pblExcludeList.txt with the following format:<\/p>\n<p><code>application-regexp:content-regexp<\/code><\/p>\n<p>For example:<\/p>\n<p><code>.*whatsapp.*:.*annoying group title.*<\/code><\/p>\n<p>And then I wrote the following code to read that file and check on my rules on every single notification before sending it to the watch:<\/p>\n<pre class=\"lang:java decode:true \">package com.scorpius;\r\n\r\nimport java.io.BufferedReader;\r\nimport java.io.BufferedWriter;\r\nimport java.io.File;\r\nimport java.io.FileNotFoundException;\r\nimport java.io.FileReader;\r\nimport java.io.FileWriter;\r\nimport java.io.IOException;\r\nimport java.util.LinkedList;\r\nimport java.util.List;\r\nimport java.util.regex.Matcher;\r\nimport java.util.regex.Pattern;\r\n\r\nimport android.os.Environment;\r\n\r\npublic class hacks {\r\n\t\r\n\tprivate static List regexps = null; \r\n\t\r\n\tpublic static boolean matchesExcludeList(String packageName, String title, String body) { \r\n\r\n\t\tBufferedWriter bw = null;\r\n\r\n\t\tif (packageName == null)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tif (regexps == null)\r\n\t\t\treadFile();\r\n\t\t\r\n\t\tfor (String rule : regexps) {\r\n\t\t\t\r\n\t\t\t\/\/ Validate that the rule is a valid rule\r\n\t\t\t\/\/ Rule format:\r\n\t\t\t\/\/ Application:Regexp\r\n\t\t\t\r\n\t\t\tif (rule != null) {\r\n\t\t\t\tint divider;\r\n\t\t\t\t\r\n\t\t\t\tif ((divider = rule.indexOf(\":\")) >= 0) {\r\n\r\n\t\t\t\t\tString application = rule.substring(0, divider);\r\n\t\t\t\t\tString regexp = rule.substring(divider + 1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tPattern p = Pattern.compile(application);\r\n\t\t\t\t\tMatcher m = p.matcher(packageName);\r\n\r\n\t\t\t\t\tif (m.matches()) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tp = Pattern.compile(regexp, Pattern.DOTALL | Pattern.CASE_INSENSITIVE); \r\n\r\n\t\t\t\t\t\tm = p.matcher(title);\r\n\t\t\t\t\t\tif (m.matches()) \r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tm = p.matcher(body);\r\n\t\t\t\t\t\tif (m.matches()) \r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tpublic static void readFile() {\r\n\r\n\t\tregexps = new LinkedList&lt;String&gt;();\r\n\t\t\r\n\t\tBufferedReader br = null;\r\n\t\ttry {\r\n\t\t\tFile sdcard = Environment.getExternalStorageDirectory();\r\n\t\t\tFile file = new File(sdcard, \"pblExcludeList.txt\");\r\n\r\n\t\t\tbr = new BufferedReader(new FileReader(file));\r\n\r\n\t\t\tString line;\r\n\t\t\t\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tregexps.add(line);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\t\/\/ What could I do?\r\n\r\n\t\t} finally {\r\n\r\n\t\t\tif (br != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\t} catch (IOException e) { }\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<p>Now compile it, convert it to dex, convert it to smali and include it in the Pebble application. Somehow it has to be Java 7:<\/p>\n<pre class=\"lang:terminal decode:true \" >naikel@debian ~\/Pebble\/hacks $ ~\/jdk1.7.0_03\/bin\/javac -cp android.jar com\/scorpius\/hacks.java\r\nnaikel@debian ~\/Pebble\/hacks $ dalvik-exchange --dex --output=classes.dex com\/scorpius\/hacks.class\r\nnaikel@debian ~\/Pebble\/hacks $ java -jar baksmali-2.1.3.jar classes.dex \r\nnaikel@debian ~\/Pebble\/hacks $ cp -r out\/com\/scorpius ~\/Pebble\/Pebble_4.0.0-1209-98b6e71\/smali\/com<\/pre>\n<p>Finally build your APK and sign it:<\/p>\n<pre class=\"lang:terminal decode:true \" >naikel@debian ~\/Pebble $ apktool b Pebble_4.0.0-1209-98b6e71\r\nI: Using Apktool 2.2.0-dirty\r\nI: Checking whether sources has changed...\r\nI: Smaling smali folder into classes.dex...\r\nI: Checking whether resources has changed...\r\nI: Building resources...\r\nI: Copying libs... (\/lib)\r\nI: Building apk file...\r\nI: Copying unknown files\/dir...\r\n\r\nnaikel@debian ~\/Pebble $ jarsigner -storepass testing -keystore pebble-modded.keystore Pebble_4.0.0-1209-98b6e71\/dist\/Pebble_4.0.0-1209-98b6e71.apk pebble-modded\r\njar signed.\r\n\r\nWarning: \r\nNo -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2044-01-14) or after any future revocation date.<\/pre>\n<p>And now you can install it in your phone. Remember that you have to <strong>uninstall the official Pebble application first<\/strong> since the signatures are different. Sadly you will lose the past health data in your phone but it will still be there in the watch. Also, you have to enable the option to allow installation of apps from unknown sources in your phone. If you are not getting any notifications you will need to turn off and then back on the notification access of the Pebble app in your phone, but I really prefer to reboot the phone after installing the app.<\/p>\n<p>Want to try my version? I added a menu option to reload the file anytime:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-App-Modded.png\" rel=\"attachment wp-att-406\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-App-Modded.png?resize=324%2C576\" alt=\"Pebble application modded with a notification filter\" width=\"324\" height=\"576\" class=\"alignnone size-full wp-image-406\" srcset=\"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-App-Modded.png?w=324&amp;ssl=1 324w, https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-App-Modded.png?resize=169%2C300&amp;ssl=1 169w\" sizes=\"auto, (max-width: 324px) 100vw, 324px\" \/><\/a><\/p>\n<p>You can get a modded 4.3.0 version <a href=\"https:\/\/s3.amazonaws.com\/thescorpiusblog\/Pebble-4.3.0-modded-by-Scorpius.apk\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; UPDATE 01\/22\/2017: You can find a modded 4.3.0 version with the modifications from this post clicking here. I really like my Pebble. Also, I really like notifications on my Pebble. But I really hate that I can&#8217;t filter those annoying WhatsApp groups notifications in my Pebble without losing all my WhatsApp notifications. The Pebble [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[26],"tags":[28,27,29],"class_list":["post-382","post","type-post","status-publish","format-standard","hentry","category-pebble","tag-android","tag-pebble","tag-smali"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pebble App Modding to Include Notification Filters - Scorpius<\/title>\n<meta name=\"description\" content=\"I decided I wanted the stock notifications but with regular expression filtering\u00a0and went ahead to modify the original Pebble application for Android.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pebble App Modding to Include Notification Filters - Scorpius\" \/>\n<meta property=\"og:description\" content=\"I decided I wanted the stock notifications but with regular expression filtering\u00a0and went ahead to modify the original Pebble application for Android.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/\" \/>\n<meta property=\"og:site_name\" content=\"Scorpius\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-01T20:02:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-01-22T16:36:27+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg\" \/>\n<meta name=\"author\" content=\"TheScorpius666\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TheScorpius666\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/\"},\"author\":{\"name\":\"TheScorpius666\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/86f96e20f253dad7eb38d3c721a950de\"},\"headline\":\"Pebble App Modding to Include Notification Filters\",\"datePublished\":\"2016-09-01T20:02:35+00:00\",\"dateModified\":\"2017-01-22T16:36:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/\"},\"wordCount\":715,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/7b346c3545c12a84ffdf2a30dfc69501\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/blog.thescorpius.com\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/Pebble-Watch-3.jpg\",\"keywords\":[\"android\",\"pebble\",\"smali\"],\"articleSection\":[\"Pebble\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/\",\"url\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/\",\"name\":\"Pebble App Modding to Include Notification Filters - Scorpius\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/blog.thescorpius.com\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/Pebble-Watch-3.jpg\",\"datePublished\":\"2016-09-01T20:02:35+00:00\",\"dateModified\":\"2017-01-22T16:36:27+00:00\",\"description\":\"I decided I wanted the stock notifications but with regular expression filtering\u00a0and went ahead to modify the original Pebble application for Android.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blog.thescorpius.com\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/Pebble-Watch-3.jpg?fit=870%2C490&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blog.thescorpius.com\\\/wp-content\\\/uploads\\\/2016\\\/09\\\/Pebble-Watch-3.jpg?fit=870%2C490&ssl=1\",\"width\":870,\"height\":490},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/2016\\\/09\\\/01\\\/pebble-app-notification-filters\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.thescorpius.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pebble App Modding to Include Notification Filters\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#website\",\"url\":\"https:\\\/\\\/blog.thescorpius.com\\\/\",\"name\":\"Scorpius\",\"description\":\"Random technology bits\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/7b346c3545c12a84ffdf2a30dfc69501\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.thescorpius.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/7b346c3545c12a84ffdf2a30dfc69501\",\"name\":\"Scorpius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g\",\"caption\":\"Scorpius\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.thescorpius.com\\\/#\\\/schema\\\/person\\\/86f96e20f253dad7eb38d3c721a950de\",\"name\":\"TheScorpius666\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g\",\"caption\":\"TheScorpius666\"},\"url\":\"https:\\\/\\\/blog.thescorpius.com\\\/index.php\\\/author\\\/thescorpius666\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pebble App Modding to Include Notification Filters - Scorpius","description":"I decided I wanted the stock notifications but with regular expression filtering\u00a0and went ahead to modify the original Pebble application for Android.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/","og_locale":"en_US","og_type":"article","og_title":"Pebble App Modding to Include Notification Filters - Scorpius","og_description":"I decided I wanted the stock notifications but with regular expression filtering\u00a0and went ahead to modify the original Pebble application for Android.","og_url":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/","og_site_name":"Scorpius","article_published_time":"2016-09-01T20:02:35+00:00","article_modified_time":"2017-01-22T16:36:27+00:00","og_image":[{"url":"http:\/\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg","type":"","width":"","height":""}],"author":"TheScorpius666","twitter_card":"summary_large_image","twitter_misc":{"Written by":"TheScorpius666","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/#article","isPartOf":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/"},"author":{"name":"TheScorpius666","@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/86f96e20f253dad7eb38d3c721a950de"},"headline":"Pebble App Modding to Include Notification Filters","datePublished":"2016-09-01T20:02:35+00:00","dateModified":"2017-01-22T16:36:27+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/"},"wordCount":715,"commentCount":8,"publisher":{"@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/7b346c3545c12a84ffdf2a30dfc69501"},"image":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg","keywords":["android","pebble","smali"],"articleSection":["Pebble"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/","url":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/","name":"Pebble App Modding to Include Notification Filters - Scorpius","isPartOf":{"@id":"https:\/\/blog.thescorpius.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/#primaryimage"},"image":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg","datePublished":"2016-09-01T20:02:35+00:00","dateModified":"2017-01-22T16:36:27+00:00","description":"I decided I wanted the stock notifications but with regular expression filtering\u00a0and went ahead to modify the original Pebble application for Android.","breadcrumb":{"@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/#primaryimage","url":"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg?fit=870%2C490&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blog.thescorpius.com\/wp-content\/uploads\/2016\/09\/Pebble-Watch-3.jpg?fit=870%2C490&ssl=1","width":870,"height":490},{"@type":"BreadcrumbList","@id":"https:\/\/blog.thescorpius.com\/index.php\/2016\/09\/01\/pebble-app-notification-filters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.thescorpius.com\/"},{"@type":"ListItem","position":2,"name":"Pebble App Modding to Include Notification Filters"}]},{"@type":"WebSite","@id":"https:\/\/blog.thescorpius.com\/#website","url":"https:\/\/blog.thescorpius.com\/","name":"Scorpius","description":"Random technology bits","publisher":{"@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/7b346c3545c12a84ffdf2a30dfc69501"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.thescorpius.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/7b346c3545c12a84ffdf2a30dfc69501","name":"Scorpius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g","caption":"Scorpius"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/ef13012e4d941d778c3d150fe29a546747df377f4e03576633b5d49b7456a78e?s=96&d=mm&r=g"}},{"@type":"Person","@id":"https:\/\/blog.thescorpius.com\/#\/schema\/person\/86f96e20f253dad7eb38d3c721a950de","name":"TheScorpius666","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e54ca7ca513e321c05a53d8ab8e2cfa46535f8b6da290e2c171b6dce40ba007?s=96&d=mm&r=g","caption":"TheScorpius666"},"url":"https:\/\/blog.thescorpius.com\/index.php\/author\/thescorpius666\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6SNpd-6a","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/posts\/382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/comments?post=382"}],"version-history":[{"count":48,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/posts\/382\/revisions"}],"predecessor-version":[{"id":612,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/posts\/382\/revisions\/612"}],"wp:attachment":[{"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/media?parent=382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/categories?post=382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thescorpius.com\/index.php\/wp-json\/wp\/v2\/tags?post=382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}