随笔分类 -  Android

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

点击右上角即可分享
微信分享提示