-2

请帮助我,我在 Eclipse 中创建了一个工作轻混合应用程序,之后我必须将该应用程序与“XTIFY”控制台集成以进行推送通知如何?

如果您有任何指南,请与我分享,或者如果您有任何示例编码,请与我分享。

我尝试了很多,我是新手,请尝试解决问题

4

1 回答 1

0

It is unclear from your question to which Worklight/MobileFirst version you are using... You can find instructions for different versions, here: https://developer.ibm.com/push/docs/ibm-mobile-push-notification/ibm-worklight/

Assuming you're using MobileFirst Platform Foundation 7.0 (the latest version supposed by Xtify), you can follow these basic steps:

  1. Create a new IBM MobileFirst Platform Foundation project or use an existing project.

  2. Download the latest version of the IBM Push Notification Worklight package and expand the zip file.

  3. It is recommended to update to the current iOS and Android SDKs at the time you start developing your app; however, the packages for IBM MobileFirst Platform Foundation are compatible with earlier versions.

  4. Copy ./js/MobilePush.js to ./apps/{app}/common/js.

  5. Optional (for debugging): Copy content of ./js/main.js from the plug-in package to the end of the file in your project: ./apps/{app}/common/js/main.js.

  6. Edit ./apps/{project}/common/index.html by copying the following:

    <script src="js/messages.js">
    </script>
    <script type="text/javascript" src="js/MobilePush.js"></script>
    <script type="text/javascript">
            document.addEventListener("deviceready", checkForMessages, false);
            document.addEventListener("resume", checkForMessages, false);
    

You then need to follow platform-specific instructions.

于 2015-06-05T12:07:48.630 回答