SUP101:黑莓可以在模拟器上运行,但不能在设备上运行
我在让教程在设备上运行时遇到问题,
它在模拟器中运行良好,但当我尝试在设备上运行它时,它不起作用。
我放置了一些日志,它似乎来自登录功能,
===JASONROGERS292C 2480 supAdmin s3pAdmin
[0.0] TAC:TAI.handleRegRsp : ALREADY_REGISTERED
[0.0] TAC:TAI.handleRegRsp : (ALREADY_REGISTERED), registered entry found:{{APN=,id=2,state=CLOSED,waf=WAF[0.0] _3GPP,keepAlive=300,IP=0.0.0.0,dnsSrv=0.0.0.0}}
[0.0] [TMM.TunnelAllocator]:runNotReadyListeners: registered listeners found
[0.0] TAC:TAI.handleListenerDeRegRsp: not existent tunnel in TAC, tid=2
[0.0] SIM cache not loaded
有人知道我在设备上运行代码时忘记做什么吗?
干杯 Jason
:
几个指向我正在做的事情的链接(我可以发布人们想要的所有代码,但它是标准生成的代码形式 SUP,这意味着很多代码哈哈)
编辑 http://infocenter.sybase .com/help/topic/com.sybase.infocenter.dc01214.0200/doc/html/title.html
已完成教程的 zip : http://www.sdn.sap.com/irj/bpx/index?rid=/webcontent/uuid/40ea4956-b95c-2e10-11b3-e68c73b2280e
解决方案: 我错过了几件事: 1) 指定应用程序应使用 Wifi
SUP101DB.getSynchronizationProfile().setString("transport", "WIFI");
2) 检查 DNS:在我的情况下,服务器位于我的 Windows 本地(通过并行),因此我必须指定 ip 而不是名称空间
getSynchronizationProfile().setServerName("10.50.30.108");//"JASONSERVER");
I'm having a problem with getting the tutorial to work on the device
it works fine in the simulator, but when I try to run it on the device it doesn't work.
I put some logs and it seems to come from the login function
===JASONROGERS292C 2480 supAdmin s3pAdmin
[0.0] TAC:TAI.handleRegRsp : ALREADY_REGISTERED
[0.0] TAC:TAI.handleRegRsp : (ALREADY_REGISTERED), registered entry found:{{APN=,id=2,state=CLOSED,waf=WAF[0.0] _3GPP,keepAlive=300,IP=0.0.0.0,dnsSrv=0.0.0.0}}
[0.0] [TMM.TunnelAllocator]:runNotReadyListeners: registered listeners found
[0.0] TAC:TAI.handleListenerDeRegRsp: not existent tunnel in TAC, tid=2
[0.0] SIM cache not loaded
has anybody got an idea what I forgot to do when running the code on a device?
Cheers
Jason
edit:
a couple of links towards what I'm doing (I can post all the code people want but its the standard generated code form SUP, which mean a lot of code lol)
The tutorial
http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01214.0200/doc/html/title.html
the zip to the already done tutorial :
http://www.sdn.sap.com/irj/bpx/index?rid=/webcontent/uuid/40ea4956-b95c-2e10-11b3-e68c73b2280e
Solution:
I was missing a couple of things:
1) Specify that the app should use Wifi
SUP101DB.getSynchronizationProfile().setString("transport", "WIFI");
2) Check that the DNS: in my case the server was local to my windows (through parallels) so I had to specify the ip and not the namespace
getSynchronizationProfile().setServerName("10.50.30.108");//"JASONSERVER");
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我下载了 SUP 101 - BlackBerry Project 并检查了来源。
它不包含常见 BB 应用程序形式的网络代码。
但是我看到
SUP101.SUP101DB
类具有以下方法:因此代码使用
com.sybase.afx.util.NetworkUtil
来获取 url 后缀。通过将这样的后缀附加到 URL,我们可以向底层 BB API 告知要使用什么网络传输。不幸的是,源代码不包含 com.sybase.afx.util.NetworkUtil 来查看它的工作原理。我应该说,即使使用本机 Java BB 开发,检测正确的网络传输也可能是一个非常棘手的部分。 OS 5+ 提供了一个更好的新网络 API,但对于旧操作系统来说这很困难。该SUP项目是使用BlackBerry JRE 4.6.1构建的,因此它不能使用新的OS 5+网络API。谁知道 SUP 是否根本无法检测到正确的网络传输?
无论如何,只需尝试一些想法:
I downloaded the SUP 101 - BlackBerry Project and checked the sources.
It does not contain networking code in the form a usual BB app would do.
However I see the
SUP101.SUP101DB
class has the following method:So the code uses
com.sybase.afx.util.NetworkUtil
to get url suffix. By appending such suffix to a url we say to the underlaying BB API what network transport to use. Unfortunatelly sources do not containcom.sybase.afx.util.NetworkUtil
to look how exactly it works.I should say that even with native Java BB development detecting a proper network transport may turn to be a very tricky part. OS 5+ provides a new networking API that is much better, but for the older OS it is hard. This SUP project is built with BlackBerry JRE 4.6.1, so it can not use new OS 5+ networking API. Who knows maybe SUP simply fails to detect proper network transport?
Any way, just a few ideas to try: