私は、Windows Mobile 6を実行し、コンパクトなフレームワーク3.5で開発しているCiperlabスキャナを持っています。私は電話をかける必要があり、通話が完了したらオペレータが取引を完了するプログラムに戻る。私はphone.dllでFunction PhoneMakeCallを使用しましたが、結果として得られるパネルにはいくつかのボタンが押されている必要があります。完璧なソリューションは、電話パネル全体を隠すことです。この前にこれを行った人のソリューションは大歓迎です。私はテクノロジーが古くなっていることを知っていますが、スキャナに付属するように私はそれに固執しています。API to PocketPC Windows Mobile 6
答えて
電話をかけるには、Telephony API(TAPI)を使用する必要があります。これは、MSが提供するAPIです。電話をかけるには多くのコードラインが必要です.OpenNetCF Telephony Compact Framwork Classesのようなラッパーを使用する方が簡単です。 Hereがその例です。 TAPIの使用例はotherです。
TAPIの利用には、マイナーな情報しかありません。
一部のデバイスベンダーは、電話機にコードでアクセスするためのデバイスをサポートするための特別なPhone SDKを提供しています。たとえば、Intermec WWAN Toolkitなどです。
私はまずopenNetCFに行きます。
ありがとうございました。情報josef。それは偉大だった
最初のリンクはが表示されます:
http://programmaremobile.blogspot.co.za/2009/10/how-to-make-call-with-opennetcf-tapi.html
これはOpenNetCfへのリンクがありますが、ここでラッパー(OpenNETCF.Telephony.dll)が削除されました。ラッパーといくつかのサンプルのソースコードを持つhttp://tapi.codeplex.com/への別のリンクがあります。 OpenNETCF.Telephony.dllはサンプルのzipファイルに含まれていますが、このバージョンにはライセンスが必要で、サンプルで使用されているすべてのメソッドもありません。私は圧縮されたソースコードをダウンロードしてコンパイルしました。いくつかの問題がありますが、うまくいきます。
私には1つの顕著な問題があります。バッテリーを節約するために、私は電話を切る。電話をかける前に30秒間オンにする必要があります。そうしないと、システムは電話機のrawパネルにドロップします.GSMネットワークが安定し、通話が可能であることを知らせるステータスイベントはありません。現時点で私はタイマーを使用していますが、これはきれいな解決策ではありません。
In Declarations
Imports OpenNETCF.Telephony
Friend WithEvents tapi As Telephony
Friend WithEvents CellLine As Line
Friend WithEvents CellCall As [Call]
Public CellPhoneCoverage As Boolean = False
Shared CellCallState As Integer = 1
Private Function CreateCellLine() As Boolean
Dim i As Integer
Dim dc As DeviceCapabilities
'Open Tapi
Try
tapi = New Telephony
tapi.Initialize()
If tapi.NumberOfDevices > 0 Then
Try
For i = 0 To tapi.NumberOfDevices - 1
tapi.GetDeviceCapabilities(i, dc)
If (dc.MediaModes And MediaMode.InteractiveVoice) = _
MediaMode.InteractiveVoice Then
'found the cellular line
CellLine = tapi.CreateLine(i, dc.MediaModes, _
CallPrivilege.None)
'To save battery turn off phone.
'Note that it must be turned on for 30 seconds
' before making a call otherwise we drop into the
' phone raw panels
NativeMethods.lineSetEquipmentState(CellLine.hLine, _
EquipmentState.Minimum)
CreateCellLine = True
'if battery is not an issue then check phone state
'Dim es As EquipmentState
'Dim rs As RadioState
'NativeMethods.lineGetEquipmentState(CellLine.hLine, es, rs)
'CreateCellLine = (es = EquipmentState.Full And rs = RadioState.On)
Exit Function
End If
Next
MsgBox("cell line not found")
CreateCellLine = False
Catch ex As Exception
CreateCellLine = False
MsgBox("CreateCellLine(1):" & ex.Message)
End Try
End If
Catch ex As Exception
CreateCellLine = False
MsgBox("CreateCellLine(2):" & ex.Message)
End Try
End Function
Handle events:
Private Sub CellCall_CallState(ByVal [call] As OpenNETCF.Telephony.Call, _
ByVal state As OpenNETCF.Telephony.CallState) _
Handles CellCall.CallState
'Note that this state change is not called for disconencted and connected events
MsgBox("Call state is " & state.ToString())
End Sub
Private Sub CellCall_Connected(ByVal [call] As OpenNETCF.Telephony.Call, _
ByVal state As OpenNETCF.Telephony.CallState) _
Handles CellCall.Connected
MsgBox("Connected")
End Sub
Private Sub CellCall_Disconnected(ByVal [call] As OpenNETCF.Telephony.Call, _
ByVal state As OpenNETCF.Telephony.CallState) _
ByVal disconnectMode As OpenNETCF.Telephony.DisconnectMode) _
Handles CellCall.Disconnected
MsgBox("Disconnected")
End Sub
In the form_load procedure:
'Open Tapi and check we have cell phone coverage
CellPhoneCoverage = CreateCellLine()
To make a call:
'If the phone if off then it must be turned on for 30 seconds
' before making a call otherwise we drop into the phone raw panels
Dim rc As Integer
Dim es As EquipmentState
Dim rs As RadioState
NativeMethods.lineGetEquipmentState(CellLine.hLine, es, rs)
If Not (es = EquipmentState.Full) Then
rc = NativeMethods.lineSetEquipmentState(CellLine.hLine, EquipmentState.Full)
Else
If (es = EquipmentState.Full And rs = RadioState.On) Then
CellCall = CellLine.MakeCall("0812500163", 27, False)
End If
End If
To end a call:
CellCall.Hangup()
If Not ((CellCallState = OpenNETCF.Telephony.CallState.Idle) Or _
(CellCallState = OpenNETCF.Telephony.CallState.Disconnected)) Then
'must do check otherwise get a null exception
Try
CellCall.Hangup()
Catch ex As Exception
MsgBox("CellCall.Hangup: " & ex.Message)
End Try
End If
'if battery is not an issue then leave phone on
' remember when making a call allow time for the network to connect
' otherwise we drop into the phone raw panels
NativeMethods.lineSetEquipmentState(CellLine.hLine, _
EquipmentState.Minimum)
:
私は参考のために私の最終的なコードを添付しています
- 1. Windows Mobile 6のHTTPサーバー
- 2. PocketPC上のC#エクステンションメソッドWindows CE
- 3. Windows Mobile 6間欠接続状態NOPATHTODESTINATION
- 4. Windows Mobile 5.0用ワイヤレスネットワークAPI
- 5. 標準Windows Mobileのピクチャボックスのイベント6
- 6. Windows Mobile 6タブストリップコントロールは同等ですか?
- 7. コンパクトフレームワークでタイムゾーンをWindows Mobile 6に設定
- 8. windows mobile上のネットワーク監視6
- 9. Windows Mobile 6で画像をアップロードする。
- 10. ARMV4i(Windows Mobile 6)ネイティブコード逆アセンブラ
- 11. Windows Mobile 6 Icon透明度とSetColorKey
- 12. Windows Mobile 6のバージョン互換性
- 13. Windows Mobile 6.xおよびCDFS
- 14. Windows Mobile 6のボタン操作の取得
- 15. Windows Mobile 6 UIの更新の問題
- 16. Windows Mobile 6 J2SE規模のJVM実装
- 17. Windows Mobile - 2ウェイコールレコーディング(C#)
- 18. Windows Mobile PPCマイクロフォン
- 19. VS2008 - PocketPC 2003以外のプラットフォームで使用できないコントロール
- 20. オープンソースWindows Mobile OCRライブラリ
- 21. アイコンは、Windows Mobile 6の黒い点を示します。
- 22. Windows Mobile 6デバイスでjavaプログラムを実行できますか?
- 23. Windows Mobile 6 - WinFormsのテキストボックスでオートコンプリートを無効にする
- 24. アプリケーションのメモリ消費を最適化するWindows Mobile 6
- 25. Windows Mobile 6でGPS時刻を取得するには?
- 26. Win32からWindows Mobile 6への切り替え:ヒント?
- 27. Windows Mobileでサービスを作成する方法6
- 28. AppiumはWindows 6 Mobile OSをサポートしていますか?
- 29. Windows Mobile 6でOSメッセージを表示しない
- 30. Windows Mobile 6でハードウェアキープレスイベントを取得する方法は?