实现功能为地图展示,定位当前位置,获取当前位置的经纬度,用户输入目的地,获取目的地的经纬度信息,在地图上标注目的地位置,根据经纬度得到距离,发布订单即将该条订单信息写入服务器。
使用百度地图和bomb实现
bomb SDK的导入我有写过,不会的可看这篇我的这篇博客: 传送门.
百度地图SDK导入我也不再赘述 官方文档.
值得注意的是在下载SDK时,不要忘记勾选检索功能(根据地址查询经纬度是会用到)
功能实现
1.地图展示
地图的展示借助之前调用百度地图的代码
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.baidu.mapapi.SDKInitializer;
import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.MapStatusUpdate;
import com.baidu.mapapi.map.MapStatusUpdateFactory;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.MyLocationData;
import com.baidu.mapapi.model.LatLng;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActivity {
public LocationClient mLocationClient;
private TextView positionText;
private MapView mapView;
private BaiduMap baiduMap;
private boolean isFirstLocate = true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mLocationClient = new LocationClient(getApplicationContext());
mLocationClient.registerLocationListener(new MyLocationListener());
SDKInitializer.initialize(getApplicationContext());
setContentView(R.layout.activity_main);
mapView = findViewById(R.id.bmapView);
baiduMap = mapView.getMap();
baiduMap.setMyLocationEnabled(true);
positionText = findViewById(R.id.position_text_view);
List permissionList = new ArrayList();
if(ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED){
permissionList.add(Manifest.permission.ACCESS_FINE_LOCATION);
}
if(ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.READ_PHONE_STATE)!= PackageManager.PERMISSION_GRANTED){
permissionList.add(Manifest.permission.READ_PHONE_STATE);
}
if(ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED){
permissionList.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
if(!permissionList.isEmpty()){
String[] permissions = permissionList.toArray(new String[permissionList.size()]);
ActivityCompat.requestPermissions(MainActivity.this,permissions,1);
}else{
requestLocation();
}
}
private void navigateTo(BDLocation location){
if(isFirstLocate){
LatLng ll = new LatLng(location.getLatitude(),location.getLongitude());
MapStatusUpdate update = MapStatusUpdateFactory.newLatLng(ll);
baiduMap.animateMapStatus(update);
update = MapStatusUpdateFactory.zoomTo(16f);
baiduMap.animateMapStatus(update);
isFirstLocate = false;
}
MyLocationData.Builder locationBuilder = new MyLocationData.Builder();
locationBuilder.latitude(location.getLatitude());
locationBuilder.longitude(location.getLongitude());
MyLocationData locationData = locationBuilder.build();
baiduMap.setMyLocationData(locationData);
}
private void requestLocation() {
initLocation();
mLocationClient.start();
}
private void initLocation() {
LocationClientOption option = new LocationClientOption();
option.setScanSpan(5000);
option.setIsNeedAddress(true);
option.setLocationMode(LocationClientOption.LocationMode.Device_Sensors);
mLocationClient.setLocOption(option);
}
protected void onResume(){
super.onResume();
mapView.onResume();
}
protected void onPause(){
super.onPause();
mapView.onPause();
}
@Override
protected void onDestroy() {
super.onDestroy();
mLocationClient.stop();
mapView.onDestroy();
baiduMap.setMyLocationEnabled(false);
}
public void onResquestPermissionsResult(int requestCode, String[] permissions, int[] grantResults){
switch (requestCode){
case 1:
if(grantResults.length>0){
for(int result : grantResults){
if(result != PackageManager.PERMISSION_GRANTED){
Toast.makeText(this,"必须同意所有权限才能使用本程序",Toast.LENGTH_SHORT).show();
finish();
return;
}
}
requestLocation();
}else{
Toast.makeText(this,"发生未知错误",Toast.LENGTH_SHORT).show();
finish();
}
break;
default:
}
}
public class MyLocationListener implements BDLocationListener{
@Override
public void onReceiveLocation(final BDLocation location) {
if(location.getLocType() == BDLocation.TypeGpsLocation || location.getLocType() == BDLocation.TypeNetWorkLocation){
navigateTo(location);
}
runOnUiThread(new Runnable() {
@Override
public void run() {
StringBuilder currentPosition = new StringBuilder();
currentPosition.append("纬度:").append(location.getLatitude()).append("\n");
currentPosition.append("经度:").append(location.getLongitude()).append("\n");
currentPosition.append("国家:").append(location.getCountry()).append("\n");
currentPosition.append("省:").append(location.getProvince()).append("\n");
currentPosition.append("市:").append(location.getCity()).append("\n");
currentPosition.append("区:").append(location.getDistrict()).append("\n");
currentPosition.append("街道:").append(location.getStreet()).append("\n");
currentPosition.append("定位方式:");
if(location.getLocType() == BDLocation.TypeGpsLocation){
currentPosition.append("GPS");
}else if(location.getLocType() == BDLocation.TypeNetWorkLocation){
currentPosition.append("网络");
}
positionText.setText(currentPosition);
}
});
}
public void onConnectHotSpotMessage(String s, int i){
}
}
}
2.获取自己当前位置的经纬度
1.新建一个order类继承BmobObject(对于使用过bomb的应该不陌生),设置我们需要插入服务器中的参数
import cn.bmob.v3.BmobObject;
public class Order extends BmobObject {
private double latitude1;
private double longitude1;
private double latitude2;
private double longitude2;
private double distanse;
public double getLatitude1() {
return latitude1;
}
public void setLatitude1(double latitude1) {
this.latitude1 = latitude1;
}
public double getLongitude1() {
return longitude1;
}
public void setLongitude1(double longitude1) {
this.longitude1 = longitude1;
}
public double getLatitude2() {
return latitude2;
}
public void setLatitude2(double latitude2) {
this.latitude2 = latitude2;
}
public double getLongitude2() {
return longitude2;
}
public void setLongitude2(double longitude2) {
this.longitude2 = longitude2;
}
public double getDistanse() {
return distanse;
}
public void setDistanse(double distanse) {
this.distanse = distanse;
}
}
2.在地图展示的代码中有一个MyLocationListener类,可以通过getLatitude()和getLongitude()方法拿到经纬度,但如何拿到参数呢?我们知道void方法是没有返还值得,这里我定义全局变量来解决这个问题(第一次写的时候没拿到值以为错了,后面试了一下又实现了)
1.首先定义4个全局变量对于两个地点经纬度
double jingdu1,weidu1,jingdu2,weidu2;
2.修改MyLocationListener类来对jingdu1和weidu1赋值,同我设了提示框提示用户的经纬度
public class MyLocationListener implements BDLocationListener{
public void onReceiveLocation(final BDLocation location) {
if(location.getLocType() == BDLocation.TypeGpsLocation || location.getLocType() == BDLocation.TypeNetWorkLocation){
navigateTo(location);
}
runOnUiThread(new Runnable() {
@Override
public void run() {
StringBuilder currentPosition = new StringBuilder();
currentPosition.append("纬度:").append(location.getLatitude()).append("\n");
currentPosition.append("经度:").append(location.getLongitude()).append("\n");
currentPosition.append("国家:").append(location.getCountry()).append("\n");
currentPosition.append("省:").append(location.getProvince()).append("\n");
currentPosition.append("市:").append(location.getCity()).append("\n");
currentPosition.append("区:").append(location.getDistrict()).append("\n");
currentPosition.append("街道:").append(location.getStreet()).append("\n");
currentPosition.append("定位方式:");
jingdu1 = location.getLatitude();
weidu1= location.getLongitude();
Toast.makeText(MainActivity.this, "你现在的位置:"+"经度:"+jingdu1+"纬度"+ weidu1,
Toast.LENGTH_SHORT).show();
// String city=location.getCity();
// String district=location.getDistrict();
// String street=location.getStreet();
// Order order = new Order();
//
// order.setLatitude1(latitude);
// order.setLongitude1(longitude);
// order.setCity(city);
// order.setDistrict(district);
// order.setStreet(street);
// order.save(new SaveListener() {
// @Override
// public void done(String objectId, BmobException e) {
// if (e == null) {
// Toast.makeText(getApplication(), "添加数据成功" ,Toast.LENGTH_SHORT).show();
// } else {
// Toast.makeText(getApplication(), "失败" +e.getMessage(),Toast.LENGTH_SHORT).show();
// }
// }
// });
positionText.setText(currentPosition);
}
});
}
public void onConnectHotSpotMessage(String s, int i){
}
}
3.目的地经纬度的获取和在地图上标注
之前一直没找到实现的方法,后面找到了百度地图定义了地址编码来实现将地址转化为经纬度,需要参数为city和address,查询到经纬度可以用getLocation().latitudeget和Location().longitude来获取经纬度。具体实现思路是设置两个输入框,分别用来输入city和address,获取输入框的值,按钮设置监听调用onGetGeoCodeResult()实现查询经纬度
1.首先在oncreate()初始化 chaxun()方法;
2.在res/drawable中加入图片icon_marka.png用于标记目的地
3.chaxun()方法代码
private void chaxun() {
// 输入框
final EditText address= (EditText) findViewById(R.id.address1);
final EditText city= (EditText) findViewById(R.id.city1);
// 按钮
bt1= (Button) findViewById(R.id.cha);
// 按钮添加监听
bt1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {// 实现点击事件
// 通过GeoCoder的实例方法得到GerCoder对象
mGeoCoder = GeoCoder.newInstance();
// 得到GenCodeOption对象
GeoCodeOption mGeoCodeOption = new GeoCodeOption();
// 得到输入框的内容赋值
mGeoCodeOption.address(address.getText().toString());
mGeoCodeOption.city(city.getText().toString());
// 为GeoCoder设置监听事件
mGeoCoder.setOnGetGeoCodeResultListener(new OnGetGeoCoderResultListener() {
@Override
public void onGetReverseGeoCodeResult(
ReverseGeoCodeResult arg0) {
}
// 地址转化经纬度
@Override
public void onGetGeoCodeResult(GeoCodeResult geoCodeResult) {
if (geoCodeResult == null
|| geoCodeResult.error != SearchResult.ERRORNO.NO_ERROR) {
Toast.makeText(MainActivity.this, "未查询到改地点",
Toast.LENGTH_SHORT).show();
} else {
jingdu2 = geoCodeResult.getLocation().latitude;
weidu2= geoCodeResult.getLocation().longitude; //全局变量赋值
Toast.makeText(MainActivity.this, "你的目的地"+"经度为:"+jingdu2+"纬度为:"+ weidu2,
Toast.LENGTH_SHORT).show();
//根据经纬度在地图上标注
BitmapDescriptor descriptor = BitmapDescriptorFactory.fromResource(R.drawable.icon_marka);
LatLng point = new LatLng( jingdu2, weidu2);
OverlayOptions option = new MarkerOptions().position(point).icon(descriptor);
baiduMap.addOverlay(option);
}
}
});
mGeoCoder.geocode(mGeoCodeOption);
}
});
}
4.两地点经纬度的写入
我们的数据类Order已经写了,全局变量也已经可以拿到了经纬度坐标,现在需要将这些数据写入服务器中。
1.首先在oncreat()方法中初始化bomb和一个fabu()方法
Bmob.initialize(this, "你的APPID");
fabu();
2.给发布按钮添加监听实现数据插入
private void fabu() {
bt2= (Button) findViewById(R.id.fabu);
bt2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Order order = new Order();
order.setLatitude1(jingdu1);
order.setLongitude1(weidu1);
order.setLatitude2(jingdu2);
order.setLongitude2(weidu2);
//根据经纬度测距离
LatLng start = new LatLng(jingdu1, weidu1);
LatLng end = new LatLng(jingdu2, weidu2);
double distanse = DistanceUtil.getDistance(start,end);
order.setDistanse(distanse);
//得到距离
order.save(new SaveListener() {
@Override
public void done(String objectId, BmobException e) {
if (e == null) {
Toast.makeText(getApplication(), "发布订单成功", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplication(), "发布失败" + e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
});
}
});
}
至此就大功告成了,贴出MainActivity的完整代码
package com.example.lbstest;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.baidu.mapapi.SDKInitializer;
import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.BitmapDescriptor;
import com.baidu.mapapi.map.BitmapDescriptorFactory;
import com.baidu.mapapi.map.MapStatusUpdate;
import com.baidu.mapapi.map.MapStatusUpdateFactory;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.MarkerOptions;
import com.baidu.mapapi.map.MyLocationData;
import com.baidu.mapapi.map.OverlayOptions;
import com.baidu.mapapi.model.LatLng;
import com.baidu.mapapi.search.core.SearchResult;
import com.baidu.mapapi.search.geocode.GeoCodeOption;
import com.baidu.mapapi.search.geocode.GeoCodeResult;
import com.baidu.mapapi.search.geocode.GeoCoder;
import com.baidu.mapapi.search.geocode.OnGetGeoCoderResultListener;
import com.baidu.mapapi.search.geocode.ReverseGeoCodeResult;
import com.baidu.mapapi.utils.DistanceUtil;
import java.util.ArrayList;
import java.util.List;
import cn.bmob.v3.Bmob;
import cn.bmob.v3.exception.BmobException;
import cn.bmob.v3.listener.SaveListener;
public class MainActivity extends AppCompatActivity {
public LocationClient mLocationClient;
private TextView positionText;
private MapView mapView;
private BaiduMap baiduMap;
private boolean isFirstLocate = true;
private static GeoCoder mCoder;
Button bt1, bt2;
GeoCoder mGeoCoder;
double jingdu1,weidu1,jingdu2,weidu2;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bmob.initialize(this, "0a972706fe2b439171f0c531575b2223");
mLocationClient = new LocationClient(getApplicationContext());
mLocationClient.registerLocationListener(new MyLocationListener());
SDKInitializer.initialize(getApplicationContext());
setContentView(R.layout.activity_main);
mapView = findViewById(R.id.bmapView);
chaxun();
fabu();
baiduMap = mapView.getMap();
baiduMap.setMyLocationEnabled(true);
positionText = findViewById(R.id.position_text_view);
List permissionList = new ArrayList();
if(ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED){
permissionList.add(Manifest.permission.ACCESS_FINE_LOCATION);
}
if(ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.READ_PHONE_STATE)!= PackageManager.PERMISSION_GRANTED){
permissionList.add(Manifest.permission.READ_PHONE_STATE);
}
if(ContextCompat.checkSelfPermission(MainActivity.this,Manifest.permission.WRITE_EXTERNAL_STORAGE)!= PackageManager.PERMISSION_GRANTED){
permissionList.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
if(!permissionList.isEmpty()){
String[] permissions = permissionList.toArray(new String[permissionList.size()]);
ActivityCompat.requestPermissions(MainActivity.this,permissions,1);
}else{
requestLocation();
}
}
private void fabu() {
bt2= (Button) findViewById(R.id.fabu);
bt2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Order order = new Order();
order.setLatitude1(jingdu1);
order.setLongitude1(weidu1);
order.setLatitude2(jingdu2);
order.setLongitude2(weidu2);
//根据经纬度测距离
LatLng start = new LatLng(jingdu1, weidu1);
LatLng end = new LatLng(jingdu2, weidu2);
double distanse = DistanceUtil.getDistance(start,end);
order.setDistanse(distanse);
//经纬度坐标的传入
order.save(new SaveListener() {
@Override
public void done(String objectId, BmobException e) {
if (e == null) {
Toast.makeText(getApplication(), "发布订单成功", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplication(), "发布失败" + e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
});
}
});
}
private void chaxun() {
// 输入框
final EditText address= (EditText) findViewById(R.id.address1);
final EditText city= (EditText) findViewById(R.id.city1);
// 按钮
bt1= (Button) findViewById(R.id.cha);
// 按钮添加监听
bt1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {// 实现点击事件
// 通过GeoCoder的实例方法得到GerCoder对象
mGeoCoder = GeoCoder.newInstance();
// 得到GenCodeOption对象
GeoCodeOption mGeoCodeOption = new GeoCodeOption();
// 得到输入框的内容赋值
mGeoCodeOption.address(address.getText().toString());
mGeoCodeOption.city(city.getText().toString());
// 为GeoCoder设置监听事件
mGeoCoder.setOnGetGeoCodeResultListener(new OnGetGeoCoderResultListener() {
@Override
public void onGetReverseGeoCodeResult(
ReverseGeoCodeResult arg0) {
}
// 地址转化经纬度
@Override
public void onGetGeoCodeResult(GeoCodeResult geoCodeResult) {
if (geoCodeResult == null
|| geoCodeResult.error != SearchResult.ERRORNO.NO_ERROR) {
Toast.makeText(MainActivity.this, "未查询到改地点",
Toast.LENGTH_SHORT).show();
} else {
jingdu2 = geoCodeResult.getLocation().latitude;
weidu2= geoCodeResult.getLocation().longitude; //全局变量赋值
Toast.makeText(MainActivity.this, "你的目的地"+"经度为:"+jingdu2+"纬度为:"+ weidu2,
Toast.LENGTH_SHORT).show();
//根据经纬度在地图上标注
BitmapDescriptor descriptor = BitmapDescriptorFactory.fromResource(R.drawable.icon_marka);
LatLng point = new LatLng( jingdu2, weidu2);
OverlayOptions option = new MarkerOptions().position(point).icon(descriptor);
baiduMap.addOverlay(option);
}
}
});
mGeoCoder.geocode(mGeoCodeOption);
}
});
}
private void navigateTo(BDLocation location){
if(isFirstLocate){
LatLng ll = new LatLng(location.getLatitude(),location.getLongitude());
MapStatusUpdate update = MapStatusUpdateFactory.newLatLng(ll);
baiduMap.animateMapStatus(update);
update = MapStatusUpdateFactory.zoomTo(16f);
baiduMap.animateMapStatus(update);
isFirstLocate = false;
}
MyLocationData.Builder locationBuilder = new MyLocationData.Builder();
locationBuilder.latitude(location.getLatitude());
locationBuilder.longitude(location.getLongitude());
MyLocationData locationData = locationBuilder.build();
baiduMap.setMyLocationData(locationData);
}
private void requestLocation() {
initLocation();
mLocationClient.start();
}
private void initLocation() {
LocationClientOption option = new LocationClientOption();
option.setScanSpan(5000);
option.setIsNeedAddress(true);
option.setLocationMode(LocationClientOption.LocationMode.Device_Sensors);
mLocationClient.setLocOption(option);
}
protected void onResume(){
super.onResume();
mapView.onResume();
}
protected void onPause(){
super.onPause();
mapView.onPause();
}
@Override
protected void onDestroy() {
super.onDestroy();
mLocationClient.stop();
mapView.onDestroy();
baiduMap.setMyLocationEnabled(false);
}
public void onResquestPermissionsResult(int requestCode, String[] permissions, int[] grantResults){
switch (requestCode){
case 1:
if(grantResults.length>0){
for(int result : grantResults){
if(result != PackageManager.PERMISSION_GRANTED){
Toast.makeText(this,"必须同意所有权限才能使用本程序",Toast.LENGTH_SHORT).show();
finish();
return;
}
}
requestLocation();
}else{
Toast.makeText(this,"发生未知错误",Toast.LENGTH_SHORT).show();
finish();
}
break;
default:
}
}
public class MyLocationListener implements BDLocationListener{
public void onReceiveLocation(final BDLocation location) {
if(location.getLocType() == BDLocation.TypeGpsLocation || location.getLocType() == BDLocation.TypeNetWorkLocation){
navigateTo(location);
}
runOnUiThread(new Runnable() {
@Override
public void run() {
StringBuilder currentPosition = new StringBuilder();
currentPosition.append("纬度:").append(location.getLatitude()).append("\n");
currentPosition.append("经度:").append(location.getLongitude()).append("\n");
currentPosition.append("国家:").append(location.getCountry()).append("\n");
currentPosition.append("省:").append(location.getProvince()).append("\n");
currentPosition.append("市:").append(location.getCity()).append("\n");
currentPosition.append("区:").append(location.getDistrict()).append("\n");
currentPosition.append("街道:").append(location.getStreet()).append("\n");
currentPosition.append("定位方式:");
jingdu1 = location.getLatitude();
weidu1= location.getLongitude();
Toast.makeText(MainActivity.this, "你现在的位置:"+"经度:"+jingdu1+"纬度"+ weidu1,
Toast.LENGTH_SHORT).show();
// String city=location.getCity();
// String district=location.getDistrict();
// String street=location.getStreet();
// Order order = new Order();
//
// order.setLatitude1(latitude);
// order.setLongitude1(longitude);
// order.setCity(city);
// order.setDistrict(district);
// order.setStreet(street);
// order.save(new SaveListener() {
// @Override
// public void done(String objectId, BmobException e) {
// if (e == null) {
// Toast.makeText(getApplication(), "添加数据成功" ,Toast.LENGTH_SHORT).show();
// } else {
// Toast.makeText(getApplication(), "失败" +e.getMessage(),Toast.LENGTH_SHORT).show();
// }
// }
// });
positionText.setText(currentPosition);
}
});
}
public void onConnectHotSpotMessage(String s, int i){
}
}
}
成果展示
感觉和我家的位置有点偏。。。。
后台数据
1.在原来地图展示项目的再开发,之前没有导入地理编码所需要的jar包导致一直报红
2.给按钮添加监听是运行一直提示说返回空指针,百度查到所是没有相应的控件造成的,但我界面是有该按钮的,这个错差点把我弄自闭了,最后发现是在oncreat方法中我把chauxn()方法写在了 setContentView(R.layout.activity_main)前面造成的,oncreat是用来初始化的,setContentView是用来初始化界面的,我在界面还没初始化时给界面的一个控件加监听所以报错,改变顺序就对了。
1.需要防范一些APP对于用户数据的窃取
大家可以看到我在MyLocationListener中注释了一段代码。这是我当时刚开始写的时候打桩测试是不是可以将详细的地址写入数据库,我把插入数据写在了获取地址信息的方法下面,APP一打开会自动定位,发现用户只要打开APP开启定位和联网,就会将用户现在的详细位置写到我的数据库里面,然后我就知道各位家在哪了 (づ。◕ᴗᴗ◕。)づ
2.安卓大量工作还是需要Java完成的,学好Java很重要
3.感觉bomb做后台实现一些后台服务器的功能还是较简单的
我以前开发微信小程序数据都是.JSON文件里的,有时间把它做成微信小程序的后台试一下
以上,希望对大家有所帮助,共勉。
作者:yf_programmer