Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Savin committed Jul 22, 2015
2 parents e56eb74 + f260c31 commit 9b127d6
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 155 deletions.
30 changes: 15 additions & 15 deletions README.md
Expand Up @@ -29,22 +29,22 @@ provides possibility to use the system push provider for a specific device.
Download [the latest AAR][opfpush-latest-aar] of OPFPush and [the latest JAR][opfutils-latest-jar] of OPFUtils
or grab it via Gradle:
```groovy
compile 'org.onepf:opfpush:0.3.0@aar'
compile 'org.onepf:opfutils:0.1.23'
compile 'org.onepf:opfpush:0.3.1@aar'
compile 'org.onepf:opfutils:0.1.24'
```

or Maven:
```xml
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfpush</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfutils</artifactId>
<version>0.1.23</version>
<version>0.1.24</version>
</dependency>
```

Expand Down Expand Up @@ -107,15 +107,15 @@ See [the following section][opf-notification-payload-support]
1. [Google Cloud Messaging][google-cloud-messaging].
Download [the latest AAR][gcm-latest-aar] or grab via Gradle:
```groovy
compile 'org.onepf:opfpush-gcm:0.3.0@aar'
compile 'org.onepf:opfpush-gcm:0.3.1@aar'
```

or Maven:
```xml
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfpush-gcm</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<type>aar</type>
</dependency>
```
Expand All @@ -125,15 +125,15 @@ See [the following section][opf-notification-payload-support]
2. [Amazon Device Messaging][amazon-device-messaging].
Download [the latest AAR][adm-latest-aar] or grab via Gradle:
```groovy
compile 'org.onepf:opfpush-adm:0.3.0@aar'
compile 'org.onepf:opfpush-adm:0.3.1@aar'
```

or Maven:
```xml
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfpush-adm</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<type>aar</type>
</dependency>
```
Expand All @@ -143,15 +143,15 @@ See [the following section][opf-notification-payload-support]
3. [Nokia Notifications][nokia-notifications].
Download [the latest AAR][nokia-latest-aar] or grab via Gradle:
```groovy
compile 'org.onepf:opfpush-nokia:0.3.0@aar'
compile 'org.onepf:opfpush-nokia:0.3.1@aar'
```
or Maven:
```xml
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfpush-nokia</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<type>aar</type>
</dependency>
```
Expand Down Expand Up @@ -203,7 +203,7 @@ Take a look at the usage of the OPFPush library in our [sample application][samp
[amazon-device-messaging]: https://developer.amazon.com/appsandservices/apis/engage/device-messaging
[nokia-notifications]: http://developer.nokia.com/resources/library/nokia-x/nokia-notifications
[opfutils]: https://github.com/onepf/OPFUtils
[opfutils-latest-jar]: https://github.com/onepf/OPFUtils/releases/download/v0.1.23/opfutils-0.1.23.jar
[opfutils-latest-jar]: https://github.com/onepf/OPFUtils/releases/download/v0.1.24/opfutils-0.1.24.jar
[jar-dependency-using]: https://github.com/onepf/OPFPush/wiki/Using-of-JAR-dependencies
[opfpush-receiver-section]: https://github.com/onepf/OPFPush/wiki/Using-of-OPFPushReceiver
[custom-push-provider]: https://github.com/onepf/OPFPush/wiki/Create-custom-push-provider
Expand All @@ -213,9 +213,9 @@ Take a look at the usage of the OPFPush library in our [sample application][samp
[opfpush-nokia]: ./opfpush-providers/nokia
[gcm-notification-payload-support]: https://developers.google.com/cloud-messaging/server-ref#notification-payload-support
[opf-notification-payload-support]: https://github.com/onepf/OPFPush/wiki/Notification-payload-support
[opfpush-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.0/opfpush-0.3.0.aar
[gcm-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.0/opfpush-gcm-0.3.0.aar
[adm-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.0/opfpush-adm-0.3.0.aar
[nokia-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.0/opfpush-nokia-0.3.0.aar
[opfpush-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.1/opfpush-0.3.1.aar
[gcm-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.1/opfpush-gcm-0.3.1.aar
[adm-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.1/opfpush-adm-0.3.1.aar
[nokia-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.1/opfpush-nokia-0.3.1.aar
[easiest-gcm]: https://github.com/onepf/OPFPush/wiki/The-easiest-way-to-implement-GCM
[sample]: https://github.com/onepf/OPFPush/tree/master/samples/pushchat
12 changes: 6 additions & 6 deletions opfpush-providers/adm/README.md
Expand Up @@ -19,31 +19,31 @@ allprojects {

Download [the latest AAR][adm-latest-aar] or grab via Gradle:
```groovy
compile 'org.onepf:opfpush-adm:0.3.0@aar'
compile 'org.onepf:opfpush-adm:0.3.1@aar'
```

or Maven:
```xml
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfpush-adm</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<type>aar</type>
</dependency>
```

You can also use JAR dependency.
Download [the latest JAR][adm-latest-jar] or grab via Gradle:
```groovy
compile 'org.onepf:opfpush-adm:0.3.0'
compile 'org.onepf:opfpush-adm:0.3.1'
```

or Maven:
```xml
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfpush-adm</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
</dependency>
```

Expand Down Expand Up @@ -127,5 +127,5 @@ builder.addProviders(new ADMProvider(context));
```

[1]: https://developer.amazon.com/appsandservices/apis/engage/device-messaging
[adm-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.0/opfpush-adm-0.3.0.aar
[adm-latest-jar]: https://github.com/onepf/OPFPush/releases/download/v0.3.0/opfpush-adm-0.3.0.jar
[adm-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.1/opfpush-adm-0.3.1.aar
[adm-latest-jar]: https://github.com/onepf/OPFPush/releases/download/v0.3.1/opfpush-adm-0.3.1.jar
8 changes: 4 additions & 4 deletions opfpush-providers/adm/build.gradle
Expand Up @@ -21,7 +21,7 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 22
versionName "0.3.0"
versionName "0.3.1"
}

lintOptions {
Expand All @@ -35,9 +35,9 @@ dependencies {
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'org.robolectric:robolectric:3.0'

compile 'org.onepf:opfpush:0.3.0@aar'
compile 'org.onepf:opfpush:0.3.1@aar'

provided 'com.amazon:amazon-device-messaging:1.0.1'
provided 'com.android.support:support-annotations:19.1.0'
provided 'org.onepf:opfutils:0.1.23'
provided 'org.onepf:opfutils:0.1.24'
}
Expand Up @@ -24,18 +24,15 @@
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;

import com.amazon.device.messaging.ADM;
import com.amazon.device.messaging.development.ADMManifest;

import org.onepf.opfpush.BasePushProvider;
import org.onepf.opfpush.listener.CheckManifestHandler;
import org.onepf.opfpush.model.AvailabilityResult;
import org.onepf.opfpush.notification.NotificationMaker;
import org.onepf.opfpush.utils.CheckUtils;
import org.onepf.opfutils.OPFLog;

import static android.Manifest.permission.GET_ACCOUNTS;
import static com.amazon.device.messaging.ADMConstants.LowLevel.ACTION_APP_REGISTRATION_EVENT;
import static com.amazon.device.messaging.ADMConstants.LowLevel.ACTION_RECEIVE_ADM_MESSAGE;
import static com.amazon.device.messaging.development.ADMManifest.PERMISSION_RECEIVE_MESSAGES;
Expand Down Expand Up @@ -87,7 +84,6 @@ public void checkManifest(@Nullable final CheckManifestHandler checkManifestHand
final Context context = getContext();
ADMManifest.checkManifestAuthoredProperly(context);
CheckUtils.checkPermission(context, PERMISSION_RECEIVE_MESSAGES, checkManifestHandler);
CheckUtils.checkPermission(context, GET_ACCOUNTS, checkManifestHandler);

final String admMessagePermission = context.getPackageName() + RECEIVE_MESSAGE_PERMISSION_SUFFIX;
CheckUtils.checkPermission(context, admMessagePermission, checkManifestHandler);
Expand Down
Expand Up @@ -24,9 +24,11 @@
import android.support.annotation.NonNull;

import org.onepf.opfpush.RetryBroadcastReceiver;
import org.onepf.opfutils.OPFChecks;
import org.onepf.opfutils.OPFLog;
import org.onepf.opfutils.OPFUtils;

import static android.Manifest.permission.GET_ACCOUNTS;
import static org.onepf.opfpush.OPFConstants.ACTION_RETRY_UNREGISTER;
import static org.onepf.opfpush.OPFConstants.EXTRA_PROVIDER_NAME;
import static org.onepf.opfpush.adm.ADMConstants.ACCOUNT_TYPE;
Expand All @@ -44,6 +46,10 @@ public class LoginAccountsChangedReceiver extends BroadcastReceiver {
@Override
public void onReceive(@NonNull final Context context, @NonNull final Intent intent) {
OPFLog.logMethod(context, OPFUtils.toString(intent));
if (!OPFChecks.hasPermission(context, GET_ACCOUNTS)) {
OPFLog.w(GET_ACCOUNTS + " permission hasn't been declared");
return;
}

final PreferencesProvider preferencesProvider = PreferencesProvider.getInstance(context);
final Account[] amazonAccounts = AccountManager.get(context).getAccountsByType(ACCOUNT_TYPE);
Expand Down
12 changes: 6 additions & 6 deletions opfpush-providers/gcm/README.md
Expand Up @@ -4,31 +4,31 @@

Download [the latest AAR][gcm-latest-aar] or grab via Gradle:
```groovy
compile 'org.onepf:opfpush-gcm:0.3.0@aar'
compile 'org.onepf:opfpush-gcm:0.3.1@aar'
```

or Maven:
```xml
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfpush-gcm</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<type>aar</type>
</dependency>
```

You can also use JAR dependency.
Download [the latest JAR][gcm-latest-jar] or grab via Gradle:
```groovy
compile 'org.onepf:opfpush-gcm:0.3.0'
compile 'org.onepf:opfpush-gcm:0.3.1'
```

or Maven:
```xml
<dependency>
<groupId>org.onepf</groupId>
<artifactId>opfpush-gcm</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
</dependency>
```

Expand Down Expand Up @@ -98,5 +98,5 @@ builder.addProviders(new GCMProvider(context, GCM_SENDER_ID));
```

[1]: https://developer.android.com/google/gcm/index.html
[gcm-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.0/opfpush-gcm-0.3.0.aar
[gcm-latest-jar]: https://github.com/onepf/OPFPush/releases/download/v0.3.0/opfpush-gcm-0.3.0.jar
[gcm-latest-aar]: https://github.com/onepf/OPFPush/releases/download/v0.3.1/opfpush-gcm-0.3.1.aar
[gcm-latest-jar]: https://github.com/onepf/OPFPush/releases/download/v0.3.1/opfpush-gcm-0.3.1.jar
6 changes: 3 additions & 3 deletions opfpush-providers/gcm/build.gradle
Expand Up @@ -21,7 +21,7 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 22
versionName "0.3.0"
versionName "0.3.1"
}

lintOptions {
Expand All @@ -35,9 +35,9 @@ dependencies {
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'org.robolectric:robolectric:3.0'

compile 'org.onepf:opfpush:0.3.0@aar'
compile 'org.onepf:opfpush:0.3.1@aar'
compile 'com.google.android.gms:play-services-gcm:7.5.0'

provided 'com.android.support:support-annotations:19.1.0'
provided 'org.onepf:opfutils:0.1.23'
provided 'org.onepf:opfutils:0.1.24'
}

This file was deleted.

0 comments on commit 9b127d6

Please sign in to comment.