dw1521
V2EX  ›  Android

关于android开发中用Intent启用电话服务出错,求大牛们指点~~不胜感激涕零

  •  
  •   dw1521 · Sep 24, 2011 · 15116 views
    This topic created in 5349 days ago, the information mentioned may be changed or developed.
    小子是android初学者,在学习用Intent启用常用的服务时遇到这样的问题:
    使用Intent调用拨号服务程序运转正常
    代码如下
    Intent intent = new Intent();
    intent.setAction(Intent.ACTION_DIAL);
    intent.setData(Uri.parse("tel:96880"));
    startActivity(intent);

    但是启用呼叫服务时,程序却报错
    Intent intent = new Intent();
    intent.setAction(Intent.ACTION_CALL);
    intent.setData(Uri.parse("tel:96880"));
    startActivity(intent);
    这样就运行不了了。。。
    在Manifest中注册了<uses-permission android:name = "android.permission.CALL_PHINE"/>还是不行。

    求大牛们指点,在线等~~
    3 replies    1970-01-01 08:00:00 +08:00
    damngood
        1
    damngood  
       Sep 24, 2011
    至少还是要贴下logcat里面的错误信息吧。。
    dw1521
        2
    dw1521  
    OP
       Sep 24, 2011
    @damngood 怪就怪在logcat里面没有错误信息。。debug的时候点击按钮整个程序会卡住不动。。。。
    dw1521
        3
    dw1521  
    OP
       Sep 24, 2011
    @damngood 对了,debug的时候会弹出一个Parcel.class的界面,显示source not found
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3044 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 09:40 · PVG 17:40 · LAX 02:40 · JFK 05:40
    ♥ Do have faith in what you're doing.