Parse.com和Android问题。
我的Parse.com后端包含已注册使用我的应用的用户。 一些用户被赋予“管理员”状态(也在Parse后端中定义),该状态具有某些特权 - 其中之一是批准或拒绝居住在他们所在城镇或城市的新用户。 例如,住在XYZ镇的管理员可以授予居住在XYZ镇的其他人的访问权限。
我的问题是这个。 使用Parse.com推送通知服务,我是否可以设置推送通知,以便每当新用户请求访问时(即,将新行添加到后端),就会向该城镇/城市的管理员发送推送通知提醒他们新用户请求访问该应用程序。
我在这里阅读了有关Android推送通知的Parse.com文档:
https://parse.com/docs/push_guide#sending/Android
我没有看到我的问题得到解决。 这可能是因为这个术语很多对我来说都是新的,我正在阅读它。
有人可以指点我在正确的方向吗?
谢谢!
Parse.com and Android question.
My Parse.com backend consists of users who have signed up to use my app. Some users are given "admin" status (also defined in the Parse backend), which comes with certain privileges - one of which is to approve or deny new users who live in the same town or city they do. For example, admins who live in Town XYZ can grant access to other people who live in town XYZ.
My question is this. Using the Parse.com Push Notification service, can I set up a push notification so that whenever a new user requests access (i.e., a new row is added to the backend), a push notification is sent to the admin of that town/city to alert them that a new user is requesting access to the app.
I have read through the Parse.com documentation on push notifications for Android here:
https://parse.com/docs/push_guide#sending/Android
I didn't see my issue addressed. This may be because so much of this terminology is new to me, that I read right over it.
Can someone please point me in the right direction here?
Thanks!
最满意答案
我知道我迟到了,但是如果你还没弄清楚,你可以使用高级定位。
在解析安装类中添加新列字段,此字段仅适用于城镇中的管理员。
然后,当用户请求访问时,用户可以使用预先定向来发送客户端侧推送通知。
ParseQuery<ParseInstallation> pq = ParseInstallation.getQuery(); pq.whereEqualTo("admin", "string consisting of the admin"); // Send push notification to query ParsePush push = new ParsePush(); push.setQuery(pq); // Set our Installation query push.setMessage("push notification text"); push.sendInBackground();i know i'm late , but if you haven't figured it out, You can use Advance targeting for this.
Add a new column field in the parse installation class , this field will only be for the admins in the towns.
Then when a user requests access, the user can send a client side push notification using advance targeting .
ParseQuery<ParseInstallation> pq = ParseInstallation.getQuery(); pq.whereEqualTo("admin", "string consisting of the admin"); // Send push notification to query ParsePush push = new ParsePush(); push.setQuery(pq); // Set our Installation query push.setMessage("push notification text"); push.sendInBackground();更多推荐
发布评论