Skip to content

Conversation

@Mofl2328
Copy link
Contributor

@Mofl2328 Mofl2328 commented Dec 6, 2017

I tried to set up the gcm and because the guide (http://docs.parseplatform.org/parse-server/guide/#configuring-your-clients-to-receive-push-notifications) is a bit outdated and it had wrong permissions. But when using them the error message would show that the error messages are from the other group of permissions. Swapping the names would solve the problem and would show the correct permissions where the problem occurred.

Atm:
bool hasApplicationPermission = hasPermissions( "android.permission.INTERNET", "android.permission.ACCESS_NETWORK_STATE", "android.permission.WAKE_LOCK", "android.permission.GET_ACCOUNTS", "com.google.android.c2dm.permission.RECEIVE", PackageName + ".permission.C2D_MESSAGE" );
gets checked and
(hasApplicationPermission ? "" : MissingApplicationPermissionMessage)
gives this output:
"<receiver android:name=\"parse.ParsePushBroadcastReceiver\" />.\n" + "android:permission=\"com.google.android.c2dm.permission.SEND\">\n" + " <intent-filter>\n" + " <action android:name=\"com.google.android.c2dm.intent.RECEIVE\" />\n" + " <action android:name=\"com.google.android.c2dm.intent.REGISTRATION\" />\n" + " <category android:name=\"" + PackageName + "\" />\n" + " </intent-filter>\n" + "</receiver>\n";
which isn't what checked and other other way around for the other group.

The error messages were swapped. After checking for the permissions mentioned in the error message it would show the missing permissions for the other group.
@codecov
Copy link

codecov bot commented Dec 6, 2017

Codecov Report

Merging #279 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #279   +/-   ##
=======================================
  Coverage   67.21%   67.21%           
=======================================
  Files         127      127           
  Lines       10139    10139           
  Branches     1455     1455           
=======================================
  Hits         6815     6815           
  Misses       3127     3127           
  Partials      197      197
Impacted Files Coverage Δ
ParsePush/Internal/Android/ManifestInfo.cs 0% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c59dbf...2a23107. Read the comment docs.

Copy link
Contributor

@montymxb montymxb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No kidding, nice catch! Thanks for correcting this @Mofl2328 .

@montymxb montymxb merged commit ce87d7f into parse-community:master Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants