English 中文(简体)
星星座中带有宇宙号/宇宙号的电话号码
原标题:Call Phone Numbers with Commas/Pauses on Samsung Android Phones
  • 时间:2012-05-18 00:20:00
  •  标签:
  • android

I m developing a dialer app which I ve been testing on my Motorola devices and the emulator images that I download through the SDK manager.

用户无论在数量上,还是从最近的电话或接触中挑选。 然后,我打下了同样的呼吁(这里的骑士们,这样,在派人前就会出现拖延):

String url = "tel:" + preDial + " ,,, " + postDial;
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(url));
startActivity(intent);

On my phones and the emulator, the phone app displays preDial with its contact name, and inserts it normally into the recent call log. When I tested it on my friend s Samsung Charge, however, it displayed the contents of the url (minus the "tel:" of course). For example if preDial = "15555555555" and postDial = "1111" the phone app would display 15555555555,,,1111 and there would be no corresponding contact name displayed due to the contact not having the number with ,,,1111 appended. This also screws up the call logs as this awkward number with no contact is stored there. I m assuming this is a function of how Samsung implemented their phone, and I m hoping there is a way around it.

我可以通过从电话日志中删除LIKE preDial,来确定电话日志,但电话中显示的号码如何保持不变。 是否有任何人知道这是一个比三星更普遍的问题,以及围绕它是否有任何办法?

最佳回答

I would say it s how Motorola implemented things, cause I never came to idea to use commas in between.. did u simply try without commas? String url = "tel:" + preDial + postDial;

Edit: Check this explanation/advice by @RetoMeier ..

希望能帮助和真正希望贵方能比我的评论好。

卡车

问题回答

试图这样做。

 String tel = preDial + " ,,, " + postDial;
// it will remove all things except number s
                tel = tel.replaceAll("\D", "");
                Intent callIntent = new Intent(Intent.ACTION_CALL);
                callIntent.setData(Uri.parse("tel:" + tel));
                startActivity(callIntent);




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签