简体   繁体   English

我可以将通知从Android发送到iOS,反之亦然吗?

[英]May I send notification from Android to iOS or vice versa?

I need to develop an application which sends notification to other device based on current action. 我需要开发一个基于当前操作将通知发送到其他设备的应用程序。

The device on which I need to send notification that might be iOS device or Android device too I am not sure which device he/she is using. 我需要在其上发送通知的设备也可能是iOS设备或Android设备,我不确定他/她正在使用哪个设备。

I know about remote notification and push notification in Android and iOS respectively which work for either for Android or iOS only. 我知道分别在Android和iOS中适用于Android或iOS的远程通知和推送通知。

But I dont know about the notifications which can work between these two different OS, so If anybody can help me, it would be a great help. 但是我不知道可以在这两个不同的操作系统之间运行的通知,因此如果有人可以帮助我,那将是一个很大的帮助。

Your query is sounds different and tricky, There are two alternative to achieve this task. 您的查询听起来有些棘手,有两种选择可以完成此任务。

  • First thing you can use Web-Service and sending and receiving request & response as per that platform code. 首先,您可以使用Web-Service ,并根据该平台代码发送和接收请求与响应。 like request parmas should be fix and base on that you have to read that response.So,it could be easy task. 像请求parma应该是固定的,并且在此基础上您必须阅读该响应。因此,这可能很容易。

  • Next way is long and complex.Like create background Bluetooth connection sending your message to other device either it could be message or file.If you are sending a file then you have to read via file stream. 下一步是漫长而复杂的,就像创建后台蓝牙连接一样,将您的消息发送到其他设备可能是消息或文件。如果要发送文件,则必须通过文件流进行读取。

    But second trick have limitation and that is area both device should be in Bluetooth range. 但是第二招有局限性,那就是两个设备都应在蓝牙范围内。

So, i would like to prefer first way to achieve your task. 因此,我希望采用第一种方式来完成您的任务。

I think you can create a web service that will use GCM (for Android) and Push Notifications for (iOS). 我认为您可以创建将使用GCM(对于Android)和推送通知(对于iOS)的Web服务。 This is the standard way the notifications are created, but you can do other interesting stuffs with it, something like, you register your device by sending the notification tokne, OS, and a name or other details that your app stores or display and in response you get similar users/data which you can notify. 这是创建通知的标准方式,但是您可以使用它来做其他有趣的事情,例如,通过发送通知通知,操作系统以及应用程序存储或显示的名称或其他详细信息来注册设备您会收到类似的用户/数据,您可以通知。 When you want to notify a device/user/etc, you just send a request to the server with the name/user (something unique) and the server will get the token from the database, the OS, and will decide what to use GCM or push notificatiom, and the device will be notified. 当您想通知设备/用户/等时,只需向服务器发送名称/用户(唯一的东西)的请求,服务器就会从数据库,操作系统中获取令牌,并决定使用什么GCM或推送通知,设备将收到通知。

Also there are a lots of tutorials for implementing GCM notifications and push notification, both on server side and mobile side 另外,在服务器端和移动端,还有很多用于实现GCM通知和推送通知的教程

"Next way is long and complex.Like create background Bluetooth connection sending your message to other device either it could be message or file.If you are sending a file then you have to read via file stream." “下一步是漫长而复杂的。就像创建后台蓝牙连接一样,将您的消息发送到其他设备可能是消息或文件。如果要发送文件,则必须通过文件流进行读取。”

But still do you think it's possible to achieve ? 但是您仍然认为有可能实现吗?

In some case it can be usefull, let me explain. 在某些情况下,它可能有用,让我解释一下。 For people (like me) who have a 5" smartphones or more (ascend mate 6.3"), they could be tempt to let their huge phone in their bag, unless you have giant pockets. 对于拥有5英寸或更多智能手机(伴侣6.3英寸)的人(如我),除非您有大口袋,否则他们很可能会把大手机放进书包。 So let say you also have an ipod touch in your pocket and the huge smartphone in your bag, your ipod touch can be able to inform you if you have received any mails, text, phone calls or any notification you can imagine. 因此,假设您的口袋里还有一个ipod touch,也有一个巨大的智能手机,您的ipod touch可以通知您是否收到了任何邮件,短信,电话或您可以想象的任何通知。

Well I hope understand what I'm thinking of. 好吧,我希望了解我的想法。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将推送通知从Android发送到iOS,反之亦然? - Send push-notification from Android to iOS and vice versa? 如何在Android中将任何应用程序从后台移到前台(反之亦然)时发送通知 - How to send notification when any application moves from background to foreground and vice versa in Android 从服务器向Android设备发送消息,反之亦然 - Send message from Server to Android device and vice versa 使用 Twilio 从 arduino 向 Android 应用发送短信,反之亦然 - Send SMS from arduino to Android App Using Twilio and Vice Versa 从 iOS 上传的音频无法在 android 上播放,反之亦然 - Audio uploaded from iOS not playing on android and vice versa 从活动向服务发送消息,反之亦然 - Send message from Activity to Service and vice versa 将图像数组从android发送到Rest Web Service(使用Java),反之亦然 - send array of images from android to rest web service(using java) and vice versa 如何将数据从python脚本通过Internet发送到Android应用程序,反之亦然。 - How to send data from python script through Internet to android app and vice versa. 使用套接字的iOS至Android,反之亦然TCP服务器客户端连接 - IOS to Android and vice versa TCP server client connection using sockets 我可以使用firebase将数据从Android应用传递到Java程序(JSE和Swing),反之亦然吗? - Can I use firebase to pass data from an Android app to Java programa(JSE & Swing) and vice versa?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM