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

Support TiSDK 8.3.X #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

### v4.* is for Titanium SDK 7.X - branch: master

### v5.* is for Titanium SDK 8.3.X - branch: master

## Install the module

Unzip the latest release in your module directory and add to tiapp modules, or just type:
Expand Down Expand Up @@ -87,9 +89,9 @@ TiGoosh.registerForPushNotifications({

// The callback to invoke when a notification arrives.
callback: function(e) {

var data = JSON.parse(e.data || '');

},

// The callback invoked when you have the device token.
Expand Down Expand Up @@ -195,7 +197,7 @@ TiGoosh.cancelWithTag(String tag, int id);

The module sets the notification tray icon taking it from `/platform/android/res/drawable-*/notificationicon.png`.

It should be flat (no gradients), white and face-on perspective.
It should be flat (no gradients), white and face-on perspective.

**NB: You have to generate the icon with all resolutions.**

Expand Down Expand Up @@ -235,20 +237,20 @@ The payload of the notification is compatible with *Parse server*.

Property | Type | Default | Description
--- | --- | --- | ----
alert | String | `null` | The message to show in the notification center and in the status bar.
alert | String | `null` | The message to show in the notification center and in the status bar.
title | String | App Title | The title to show in the notification center.
sound | String | `false` | The sound of the notification. If `true` or `default` the default sound is used, otherwise you can specificy an audio file path located in the app bundle (`/assets/`)
vibrate | Boolean | `false` | Control the vibration of the phone.
vibrate | Array | `null` | This property can also be an array with a pattern. When the notification is received the device will vibrate following that pattern
lights | Object | `null` | This optional property sets the LED light color and frequency. Check out the property description below on how to send it
badge | Number | `null` | The icon on the launchscreen will display this number on the right-top corner if supported.
icon | String | `null` | A URL represting a large icon to show.
icon | String | `null` | A URL represting a large icon to show.
color | String | `null` | Background color of the notification icon
tag | String | `null` | Tag of this notification.
id | Number | `null` | ID of this notification.
force_show_in_foreground | Boolean | `false` | Control if notification must be shown as alert even if app is in foreground.
ongoing | Boolean | `false` | Set whether this is an ongoing notification.
group | String | `null` | Set this notification to be part of a group of notifications sharing the same key.
group | String | `null` | Set this notification to be part of a group of notifications sharing the same key.
group_summary | Boolean | `null` | Sets whether this notification is the main one for it's group
when | Number | `null` | Set the time that the event occurred. Notifications in the panel are sorted by this time.
only_alert_once | Boolean | `null` | Set this flag if you would only like the sound, vibrate and ticker to be played if the notification is not already showing.
Expand Down Expand Up @@ -334,9 +336,9 @@ Sending a message to a topic

## Handle the notification on the app

The payload of the notifications is the same that comes from your server.
The payload of the notifications is the same that comes from your server.

**NB: You have to parse the `data` object on the javascript side:**
**NB: You have to parse the `data` object on the javascript side:**

```
function(e) {
Expand Down
Binary file not shown.
Binary file modified android/dist/ti.goosh.jar
Binary file not shown.
Binary file modified android/libs/armeabi-v7a/libti.goosh.so
Binary file not shown.
Binary file modified android/libs/x86/libti.goosh.so
Binary file not shown.
4 changes: 2 additions & 2 deletions android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 4.2.0
version: 5.0.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86
description: ti.goosh
Expand All @@ -15,4 +15,4 @@ name: ti.goosh
moduleid: ti.goosh
guid: 5ad17cbc-1fed-4f20-8f27-6d1baa49ea9f
platform: android
minsdk: 7.0.0
minsdk: 8.3.0
3 changes: 1 addition & 2 deletions android/platform/android/res/values/version.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="google_play_services_version">11020000</integer>
</resources>
</resources>
5 changes: 2 additions & 3 deletions example-app/tiapp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
</ios>
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:versionCode="1" android:versionName="1.0">
<uses-sdk android:targetSdkVersion="26" android:minSdkVersion="16"/>
<supports-screens android:xlargeScreens="false" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true"/>
<application android:hardwareAccelerated="true">
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
Expand All @@ -69,5 +68,5 @@
<target device="iphone">false</target>
<target device="mobileweb">false</target>
</deployment-targets>
<sdk-version>7.4.0.GA</sdk-version>
</ti:app>
<sdk-version>8.3.0.GA</sdk-version>
</ti:app>