【问题标题】:Not able to see Worklight settings option in android phones?在 Android 手机中看不到 Worklight 设置选项?
【发布时间】:2014-03-22 01:37:41
【问题描述】:

我最近开始使用 Worklight 6.1 开发者版来创建一个 android 应用程序。我以前版本的应用程序部署在我的 nexus 5 上,我能够查看 Worklight 设置选项、更改我的服务器 URL 等等。 看这里:: http://www.connoisseur.comli.com/screenshots/Screenshot_nexus.png

后来我无法查看此设置选项。 这里:: http://www.connoisseur.comli.com/screenshots/Screenshot_2014-03-21-19-03-47.png

我的应用程序描述符文件:

 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Licensed Materials - Property of IBM
         5725-G92 (C) Copyright IBM Corp. 2006, 2013. All Rights Reserved.
         US Government Users Restricted Rights - Use, duplication or
         disclosure restricted by GSA ADP Schedule Contract with IBM Corp. --><!--   Attribute "id" must be identical to application folder name --><application xmlns="http://www.worklight.com/application-descriptor" id="MF_PIZZA" platformVersion="6.1.0.00.20131219-1900">
<displayName>MF_PIZZA</displayName>
<description>MF_PIZZA</description>
<author>
    <name>application's author</name>
    <email>application author's e-mail</email>
    <homepage>http://mycompany.com</homepage>
    <copyright>Copyright My Company</copyright>
</author>
<mainFile>MF_PIZZA.html</mainFile>
<features>
    <JSONStore/>
    <Analytics/>
</features>
<thumbnailImage>common/images/thumbnail.png</thumbnailImage>
<iphone bundleId="com.MFPIZZA" version="1.0">
    <worklightSettings include="true"/>
    <security>
        <encryptWebResources enabled="false"/>
        <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
    </security>
</iphone>
<android version="1.0">
    <worklightSettings include="true"/>
    <security>
        <encryptWebResources enabled="false"/>
        <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
        <publicSigningKey>Replace this text with the actual public signing key of the certificate used to sign the APK, available by using the 'Extract public signing key' wizard.</publicSigningKey>
    </security>
</android>
</application>

我在 cmets 中添加了第三种情况,因为由于我在 Reputation 中的限制,我无法发布两个以上的链接。

【问题讨论】:

标签: android ibm-mobilefirst


【解决方案1】:

查看这个问题的答案:IBM Worklight 6.1 - Questions about "Worklight Settings"

这是一个详细的答案,解释了为什么您可能会或可能不会在 Android 中看到“菜单”按钮。
基本上,它取决于 Android 项目使用的 API 级别以及使用的操作系统版本。从某个 API 级别开始,Android 中的 Options Menu 被移除(由 Android)并被 Action bar 取代。 Worklight 不支持操作栏,这就是您看不到菜单选项的原因。

这是产品中已知的缺失功能。


来自cmets:

在开发过程中,是否可以静态更改服务器 URL 没有设置功能?

  1. 您可以设置远程服务器地址using the Build Settings and Deploy Target dialog
  2. 您还可以将android\native\wlclinet.properties 复制到nativeResources 文件夹并编辑其中的属性。构建后,此文件将被复制到 native 文件夹

在这两个选项中,更改都是在构建应用程序之前完成的,而不是在运行时。

【讨论】:

  • 那么有没有其他方法可以从应用程序手动更改服务器 URL?
  • 您是否意识到此功能仅用于测试而不用于生产?
  • Worklight 设置选项再次仅用于测试,Worklight 不正式支持更改应用程序连接到的服务器 URL。有一个 hack,但实施它意味着如果出现问题,就会取消支持。
  • 在开发过程中,是否可以在没有设置功能的情况下静态更改服务器URL?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-10-12
  • 1970-01-01
  • 2020-05-20
  • 2011-06-26
  • 1970-01-01
  • 1970-01-01
  • 2016-03-13
相关资源
最近更新 更多