我想知道我收到手机的手机名称(黑莓/ iPhone/ipad).如何识别手机名称?是否有标题来标识移动名称?
我想在黑莓的底部放一个菜单,菜单项添加到水平字段管理器...如何将菜单放在屏幕的底部...
我正在向用户显示一个double,但它打印为1.00000000001
但是,我只需要小数点后两位数.
请帮帮我..有谁知道吗?是我的blackberry bold 9700(5.0.0.469)支持HTML5音频流吗?谢谢..
我使用java-me和BlackBerry特定API创建了一个BlackBerry应用程序.它在BlackBerry模拟器上运行良好.
我想知道如何将此应用程序部署到BlackBerry设备.从文档中我发现在设备上运行BlackBerry应用程序需要进行一些代码签名.这意味着什么?所有应用程序都需要此代码签名吗?以及构建我的应用程序以在BlackBerry设备上运行的步骤是什么?
手机型号:bb曲线8520
电话版本:4.6.1.314
承运人:印度的airtel
APN:airtelgprs.com
没有用户名和密码
我使用以下代码:
String url="http://<address>:<port>/path;deviceside=true";
HttpConnection conn =(HttpConnection)Connector.open(url,Connector.READ_WRITE,true);
int response=conn.getResponseode();
if(responsecode==HttpConnection.HTTP_OK)
{
//...code for handling the response...
}
Run Code Online (Sandbox Code Playgroud)
此代码抛出"隧道失败"异常.我无法理解它背后的原因.根据网络运营商,在电话中正确定义了APN.我也可以通过浏览器访问互联网.
如果您知道隧道故障或严重隧道故障的原因,请回复我.
还有一件事,代码在我附加interface=wifi到位时工作正常deviceside=true(这需要打开并连接WIFI).
[编辑]
我检查了BlackBerry Curve 8520 mobile中的日志,它看起来像这样:
E net.rim.tcp-TNLf 0
a net.rim.tunnel-pdp2 1
a net.rim.hrtRT-EPRj 0x2100000001
a net.rim.tunnel - STnc-00000000
a net.rim.tunnel- Open - airtelgprs.com
a net.rim.tcp-open
Run Code Online (Sandbox Code Playgroud)
看到日志后有人猜错了吗?
我想在主屏幕中使用时运行垂直字段管理器的构造函数:
vfm = new VerticalFieldManager(){
protected void VerticalFieldManager(){
System.out.println("Fresh");
}
protected void sublayout(int maxWidth, int maxHeight){
super.sublayout(maxWidth, 420);
setExtent(maxWidth,420);
}
};
Run Code Online (Sandbox Code Playgroud)
当然,VerticalFieldManager不起作用.
如何从作为客户端的黑莓应用程序向服务器发送JSON请求以从服务器获取信息以在BB应用程序中使用它我在Windows 7下使用blackberry eclipse
我试试这段代码
public void loginRequest() throws IOException, JSONException{
HttpConnection c = null;
InputStream is = null;
int rc;
JSONObject postObject = new JSONObject();
postObject.put("method", method);
//postObject.put("params", Parameters);
try{
c = (HttpConnection)Connector.open(urlPath);
// Set the request method and headers
c.setRequestMethod(HttpConnection.GET);
c.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
c.setRequestProperty("Content-Length", "" + (postObject.toString().length() - 2));
c.setRequestProperty("method", "GET");
// Getting the response code will open the connection,
// send the request, and read the HTTP response headers.
// The headers are stored until requested.
rc = c.getResponseCode(); …Run Code Online (Sandbox Code Playgroud) 我正在BlackBerry中使用基于UI的应用程序.UI如下所示:
Run Code Online (Sandbox Code Playgroud)label-1 : Oject choice field-1 label-2 : Oject choice field-2 label-3 : Oject choice field-3 label-4 : Oject choice field-4 label-5 : Oject choice field-5
生成此UI实际上变得非常困难.宽度和高度是我遇到困难的主要问题.
public HomeScreen() {
super(MainScreen.USE_ALL_WIDTH | USE_ALL_HEIGHT | VERTICAL_SCROLL);
_dbOperations = new DBOperations();
_mainVFM = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH);
_mainVFM.setMargin(10, 10, 40, 10);
_menuFieldVFM = new VerticalFieldManager();
_menuFieldVFM.setMargin(0, 5, 0, 0);
_menuDropDownVFM = new VerticalFieldManager();
((VerticalFieldManager) getMainManager()).setBackground(BackgroundFactory.createSolidBackground(Constants.BgColorCode));
XYEdges padding = new XYEdges(1, 1, 1, 1);
Border roundedBorder = BorderFactory.createSimpleBorder(padding);
// HEADING
_headingHFM = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH);
_headingLabelField …Run Code Online (Sandbox Code Playgroud) 我正在尝试为黑莓做一个应用程序在黑莓地图上做一些思考.当我开始在smilator上调试时,由于网络覆盖不足而导致错误.
我在它的浏览器上试过google.com,但它确实有效!但在我的应用程序上它提供的网络错误不足.
这个问题怎么解决?