DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: laidabin
今日帖子: 4
在线用户: 33
导航: 论坛 -> 移动应用开发 斑竹:flyers,iamdream  
作者:
男 scolate (scolate) ★☆☆☆☆ -
普通会员
2014/10/1 22:51:53
标题:
请教,调用Androidapi.JNI.Telephony下的参数出错。 浏览:1404
加入我的收藏
楼主: 写个了小程序,获取手机的一些信息。
调用的是  Androidapi.JNI.Telephony这个下面的 JCellIdentityGsm, 这个函数的get cid ,出错,出错提示为“Access violation at address 4097C5Ec,accessing address 0000002C.
点击按钮,出现上面的出错。具体是到get cid这步提示的。希望各位大侠能给一下提示或解答。代码如下:
procedure TCellinformation.btnGetCarrierInfoClick(Sender: TObject);
var
  PhoneDialerService: IFMXPhoneDialerService;
  CellIDService:JCellIdentityGsm;
   Jgsm:  JCellIdentityGsm;
begin
  { test whether the PhoneDialer services are supported }
  if TPlatformServices.Current.SupportsPlatformService(IFMXPhoneDialerService, IInterface(PhoneDialerService)) then
  begin
    { if yes, then update the labels with the retrieved information }
    CarrierNameItem.ItemData.Detail := PhoneDialerService.GetCarrier.GetCarrierName;
    CountryCodeItem.ItemData.Detail := PhoneDialerService.GetCarrier.GetIsoCountryCode;
    NetworkCodeItem.ItemData.Detail := PhoneDialerService.GetCarrier.GetMobileCountryCode;
    MobileNetworkItem.ItemData.Detail := PhoneDialerService.GetCarrier.GetMobileNetwork;
    Jgsm:= TJCellIdentityGsm.Create;
    CELLIDItem.ItemData.Detail:=Jgsm.getCid.toString);
    end
  else
    ShowMessage('不支持的服务');

 end;
此帖子包含附件:
PNG 图像
大小:243.8K
----------------------------------------------
-
作者:
男 scolate (scolate) ★☆☆☆☆ -
普通会员
2014/10/1 22:52:49
1楼:  目前是DELPHI XE7 ,这个是支持ShowMessage的。
----------------------------------------------
-
作者:
男 wang_80919 (Flying Wang) ★☆☆☆☆ -
普通会员
2014/10/7 10:09:52
2楼:  Jgsm:= TJCellIdentityGsm.Create;
这种写法,不出错,才怪。
----------------------------------------------
(C)(P)Flying Wang
作者:
男 wang_80919 (Flying Wang) ★☆☆☆☆ -
普通会员
2014/10/7 10:11:23
3楼:  Jgsm:= JXX对象.getgsm函数
或者
 Jgsm:= TJCellIdentityGsm.JavaClass.init如果有这个函数的话。

或者
 Jgsm:= TJCellIdentityGsm.JavaClass.XXX函数。
----------------------------------------------
(C)(P)Flying Wang
作者:
男 scolate (scolate) ★☆☆☆☆ -
普通会员
2014/10/8 8:48:08
4楼: 按照这个写法,TJCellIdentityGsm.JavaClass.init;
加载后,提示Java Class JcellIdentityGSM could not be found.
----------------------------------------------
-
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行130.8594毫秒 RSS