随笔分类 - Android
摘要:在Android中,Service和Activity可以通过多种方式进行通信。以下是一个简单的例子,展示了如何使用Intent、Binder和Interface来实现Service和Activity之间的通信。 首先,定义一个Service并创建一个绑定器类(Binder): public clas
阅读全文
摘要:android http post private void sendLocationToServer(double latitude, double longitude) { String tagID="xcvxczvxzvcxz"; String name=""; String biaoduan
阅读全文
摘要:<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-perm
阅读全文
摘要:Android百度地图二次开发绘制不规则区域 //多边形顶点位置 List<LatLng> points = new ArrayList<>(); points.add(new LatLng(44.60347, 34.1156714)); points.add(new LatLng(44.60291
阅读全文
摘要:百度地图二次开发Android版地图自动缩放 float zoom1 = 19.0f; // 再创建一个MapStatusUpdate对象,用于设置缩放级别 MapStatusUpdate mapStatusUpdateZoom = MapStatusUpdateFactory.zoomTo(zoo
阅读全文
摘要:<service android:name=".LocationService" android:enabled="true" android:exported="false"> <!-- 其他intent-filter(如果有的话) --> <intent-filter> <action andr
阅读全文
摘要:android获取位置并上传 import android.content.Context; import android.content.pm.PackageManager; import android.location.Location; import android.location.Loc
阅读全文
摘要:默认布局 <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/andro
阅读全文
摘要:获取UUID BluetoothDevice device1 = mBondedDeviceList.get(i); ParcelUuid[] p1s = device1.getUuids(); showToast("即将连接该设备1:"+device1.getName()+" "+p1s[1]);
阅读全文
摘要:Android 蓝牙打开与关闭 /** * 打开蓝牙 * @param activityObj * @param requestCode */ public void turnOnBlueTooth(Activity activityObj,int requestCode){ Intent inte
阅读全文
摘要:Android 安装日志 Preparing "Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.6)". Downloading https://dl.google.com/android/reposito
阅读全文