为什么没有卡(由我开发的主机应用程序注册)出现在Sony SmartEyeGlass上

时间:2015-03-26 07:13:51

标签: sony-smarteyeglass

我有一个GPS导航应用程序。现在我想将此应用程序用作主机应用程序,并在Sony SmartEyeGlass上显示一些信息。

但我在第一步陷入困境......

首先,我想在Sony SmartEyeGlass上展示一张卡片。我读了这个网站 (https://developer.sony.com/2014/09/19/how-to-create-your-first-smarteyeglass-project/

根据它,我尝试从HelloLayout修改示例代码并将它们放入我的主机应用程序中。无论如何,在我启动主机应用程序后,SmartEyeGlass上没有任何变化。

有什么想法?对不起,如果我没有让我的问题清楚。如果有人需要,我会很乐意提供更多细节。 请帮忙。我很绝望... 在此先感谢!!

2 个答案:

答案 0 :(得分:1)

这些指南通常不完整。尝试导入示例应用程序并从那里开始。

答案 1 :(得分:0)

我遇到了同样的问题。事实证明,如果我在RegistrationInformation类中实现了getRequiredNotificationApiVersion()来返回" 4",那么整个应用程序都不会再运行了。

要排除此问题,请将RegistrationInformation类实现中的相关代码修改为以下内容:

private static final int CONTROL_API_VERSION = 4;

@Override
public int getRequiredWidgetApiVersion() {
    // TODO Auto-generated method stub
    return API_NOT_REQUIRED;
}

@Override
public int getTargetControlApiVersion() {
    // TODO Auto-generated method stub
    return CONTROL_API_VERSION;
}

@Override
public int getRequiredControlApiVersion() {
    // TODO Auto-generated method stub
    return CONTROL_API_VERSION;
}

@Override
public int getRequiredSensorApiVersion() {
    // TODO Auto-generated method stub
    return API_NOT_REQUIRED;
}

@Override
public int getRequiredNotificationApiVersion() {
    // TODO Auto-generated method stub
    return API_NOT_REQUIRED;
}