Android phone call撥號

Android內也一樣可以在app內直接進行撥號,如果是iOS上可參考前一篇"iOS dial a phone call 在app內撥電話
"

用法上相當簡單,只要在需要撥號的地方加上以下這段code
Intent i = new Intent( Intent.ACTION_CALL );
i.setData(Uri.parse("tel:"+"Phone number"));
startActivity(i);


然後在"AndroidManifest.xml"的<manifest>與</manifest>內加上下面這段
<uses-permission android:name="android.permission.CALL_PHONE"/>

※"AndroidManifest.xml"在建立專案時就會自動產生在專案最外層

相關連結
Android Developers
Android Developers - ACTION_CALL