我想要在我的应用程序中集成Glympse,其中我的移动应用程序有两个用户,分别使用应用程序,如果一个人想要查看另一个人的实时位置,并且他们都在不同的模块上工作,但相同的应用程序。
用你的Glympse可行吗?
此外,我使用以下代码从GlympseLiteWrapper获取实例时获取空指针,而尝试使用以下代码发送Glympse票据
**/*Send a Glympse*/**
GTicketLite ticket = LiteFactory.createTicket(3600000, "Going home!", null);
// Set flags that adjust the presentation of the Glympse Send Wizard.
// These can enable/disable fields in the wizard screen.
final int WIZARD_FLAGS
= LC.SEND_WIZARD_INVITES_EDITABLE
| LC.SEND_WIZARD_MESSAGE_EDITABLE
| LC.SEND_WIZARD_DESTINATION_EDITABLE
| LC.SEND_WIZARD_TIME_EDITABLE;
// Launches the wizard which will send the Glympse
GGlympseLite glympse = GlympseLiteWrapper.instance().getGlympse();
glympse.sendTicket(ticket, WIZARD_FLAGS);发布于 2014-02-20 04:52:34
空指针异常最有可能是因为在调用这些方法之前没有启动Glympse平台。有关如何在Android的活动生命周期方法中启动和停止平台的示例,请参阅我们的Lite SDK中的示例应用程序。在您的应用程序中启动平台应如下所示
@Override protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Start up the Glympse API
GlympseLiteWrapper.instance().start(this);
// Register this class as a listener for Glympse events
GlympseLiteWrapper.instance().getGlympse().addListener(this);
}另外,请确保您已经从我们的开发人员站点获取了一个API key,并将其设置在GlympseLiteWrapper.java中。
您的用例听起来绝对像是可以很好地利用Glympse。Lite SDK只支持在web浏览器中查看Glympses。商业SDK附带了一些工具,用于在您自己的应用程序中显示收到的Glympses。
请在这里查看精简版和商用版SDK之间的差异列表,如果听起来需要我们的完整SDK,请发送消息给我们:https://developer.glympse.com/comparison
https://stackoverflow.com/questions/21871613
复制相似问题