Android APK を BlackBerry Playbook 2.1 に移植しようとしています。そのために、http://developer.blackberry.com/android/documentation/gettingstarted.htmlに記載されている手順に従いました。
GPSData (経度と緯度) を で表示するサンプル アプリケーションを開発しましたTextView
。アプリケーションは Android デバイスで正常に動作しています。次に、それを BAR ファイルに変換しました。また、互換性リストを確認したところ、ロゴのサイズに関する問題が 1 つだけ見つかりましたが、これは大きな問題ではありません。ただし、BlackBerry ではアプリケーションがクラッシュします。
と を使用LocationManager.GPS_PROVIDER
してLocationManager.NETWORK_PROVIDER
います。BlackBerry デバイスで次の条件が true を返すため、両方を使用できます。
if (GetLocation.mGPSLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
//this line of code write log into a file
Log.debug(this.getClass() + " :: Caller :: " + caller,"Found GPS Provider");
GetLocation.mGPSLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 10000, 10,GetLocation.mGPSLocationListener);
}
次のコードに問題があるようです:
private class GPSLocationListener implements LocationListener {
public void onLocationChanged(Location location) {
....
....
}
}
ご意見をお聞かせください。