(R.id.pano)
165 | val surfaceView = pano.getChildAt(0)
166 |
167 | init {
168 |
169 | // pano.onResume()
170 | if (surfaceView is SurfaceView) {
171 | Log.e("zyq", "$surfaceView")
172 | surfaceView.setZOrderOnTop(true)
173 | surfaceView.holder.setFormat(PixelFormat.TRANSPARENT)
174 | surfaceView.setBackgroundColor(Color.parseColor("#00000000"))
175 | }
176 | }
177 | }
178 | }
179 | }
180 |
--------------------------------------------------------------------------------
/app/src/main/java/com/engineer/panorama/ui/PanoViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.engineer.panorama.ui;
2 |
3 | import android.Manifest;
4 | import android.animation.Animator;
5 | import android.animation.AnimatorListenerAdapter;
6 | import android.animation.ValueAnimator;
7 | import android.annotation.SuppressLint;
8 | import android.content.Intent;
9 | import android.graphics.Bitmap;
10 | import android.os.Build;
11 | import android.os.Bundle;
12 | import android.os.Environment;
13 | import android.os.Handler;
14 | import android.os.Looper;
15 | import android.os.Message;
16 | import android.util.Log;
17 | import android.view.PixelCopy;
18 | import android.view.SurfaceView;
19 | import android.view.View;
20 | import android.view.animation.Animation;
21 | import android.view.animation.AnimationUtils;
22 | import android.view.animation.LinearInterpolator;
23 | import android.widget.FrameLayout;
24 | import android.widget.RelativeLayout;
25 | import android.widget.TextView;
26 | import android.widget.Toast;
27 |
28 | import androidx.recyclerview.widget.RecyclerView;
29 |
30 | import com.alibaba.fastjson.JSON;
31 | import com.baidu.lbsapi.panoramaview.PanoramaView;
32 | import com.baidu.lbsapi.panoramaview.PanoramaViewListener;
33 | import com.baidu.lbsapi.tools.CoordinateConverter;
34 | import com.baidu.lbsapi.tools.Point;
35 | import com.baidu.mapapi.map.BaiduMap;
36 | import com.baidu.mapapi.map.BitmapDescriptor;
37 | import com.baidu.mapapi.map.BitmapDescriptorFactory;
38 | import com.baidu.mapapi.map.MapStatus;
39 | import com.baidu.mapapi.map.MapStatusUpdate;
40 | import com.baidu.mapapi.map.MapStatusUpdateFactory;
41 | import com.baidu.mapapi.map.MapView;
42 | import com.baidu.mapapi.map.MarkerOptions;
43 | import com.baidu.mapapi.map.OverlayOptions;
44 | import com.baidu.mapapi.model.LatLng;
45 | import com.engineer.StatusBarUtil;
46 | import com.engineer.panorama.R;
47 | import com.engineer.panorama.bean.HotCityPanoBean;
48 | import com.engineer.panorama.bean.PanoramaBean;
49 | import com.engineer.panorama.util.ScreenView;
50 | import com.tbruyelle.rxpermissions2.RxPermissions;
51 |
52 | import java.io.File;
53 | import java.io.FileOutputStream;
54 | import java.io.IOException;
55 |
56 | /**
57 | * 全景Demo主Activity
58 | */
59 | public class PanoViewActivity extends BaseFullScreenActivity {
60 |
61 | private static final String LTAG = "BaiduPanoSDKDemo";
62 |
63 | private PanoramaView mPanoView;
64 | private TextView textTitle;
65 |
66 | private double latitude = 39.963175;
67 | private double longitude = 116.400244;
68 |
69 |
70 | //地图
71 | private MapView mMapView = null;
72 | private BaiduMap mBaiduMap = null;
73 | //定义操作动作
74 | private final int ACTION_DRAG = 0;
75 | private final int ACTION_CLICK = 1;
76 |
77 | //title是否可见
78 | private boolean titleVisible = true;
79 | //title显示隐藏动画
80 | private Animation animationShow, animationHide;
81 |
82 |
83 | private MyHandler handler;
84 |
85 | //添加Marker
86 | private LatLng point;
87 | //构建Marker图标
88 | private BitmapDescriptor bitmap;
89 | //构建MarkerOption,用于在地图上添加Marker
90 | private OverlayOptions option;
91 |
92 | private String name, pid;
93 |
94 | private ScreenView mScreenView;
95 |
96 | private SurfaceView mSurfaceView;
97 |
98 | private RelativeLayout mToolbbar;
99 |
100 | private ValueAnimator valueAnimator;
101 |
102 | @Override
103 | public void onCreate(Bundle savedInstanceState) {
104 | super.onCreate(savedInstanceState);
105 | // requestWindowFeature(Window.FEATURE_NO_TITLE);
106 |
107 | // setContentView(R.layout.panodemo_main);
108 |
109 | if (getIntent() != null) {
110 | latitude = getIntent().getDoubleExtra("latitude", 0);
111 | longitude = getIntent().getDoubleExtra("longitude", 0);
112 | name = "name";
113 | pid = "4373943294879844934";
114 | }
115 |
116 | initView();
117 | FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) mToolbbar.getLayoutParams();
118 | params.topMargin = StatusBarUtil.INSTANCE.getStatusBarHeight(this);
119 | mToolbbar.setLayoutParams(params);
120 | testPano();
121 | }
122 |
123 |
124 | private void initView() {
125 | textTitle = (TextView) findViewById(R.id.panodemo_main_title);
126 | mPanoView = (PanoramaView) findViewById(R.id.panorama);
127 |
128 |
129 | mPanoView.setPanoramaImageLevel(PanoramaView.ImageDefinition.ImageDefinitionHigh);
130 |
131 | mMapView = (MapView) findViewById(R.id.bmapView);
132 | mBaiduMap = mMapView.getMap();
133 |
134 | // sv = (GLSurfaceView) mMapView.getChildAt(0);
135 | // sv.setZOrderMediaOverlay(true);
136 |
137 | mMapView.showScaleControl(false);
138 | mMapView.showZoomControls(false);
139 |
140 | //定义Maker坐标点
141 | point = new LatLng(latitude, longitude);
142 | //构建Marker图标
143 | bitmap = BitmapDescriptorFactory
144 | .fromResource(R.drawable.icon_marka);
145 |
146 |
147 | //定义地图状态
148 | MapStatus mMapStatus = new MapStatus.Builder()
149 | .target(point)
150 | .zoom(18)
151 | .build();
152 | //定义MapStatusUpdate对象,以便描述地图状态将要发生的变化
153 |
154 |
155 | MapStatusUpdate mMapStatusUpdate = MapStatusUpdateFactory.newMapStatus(mMapStatus);
156 | //改变地图状态
157 | mBaiduMap.setMapStatus(mMapStatusUpdate);
158 |
159 | mToolbbar = findViewById(R.id.toolbar);
160 | animationShow = AnimationUtils.loadAnimation(this, R.anim.pop_show_animation);
161 | animationHide = AnimationUtils.loadAnimation(this, R.anim.pop_hidden_animation);
162 |
163 | findViewById(R.id.crop).setOnClickListener(v -> requestPermission());
164 | findViewById(R.id.menu).setOnClickListener(v -> {
165 | startActivity(new Intent(this, ListPanoViewActivity.class));
166 | finish();
167 | }
168 | );
169 | findViewById(R.id.list).setOnClickListener(v -> {
170 | startActivity(new Intent(this, ListMapViewActivity.class));
171 | finish();
172 | });
173 |
174 | FrameLayout cover = findViewById(R.id.black_cover);
175 | FrameLayout layoutContent = findViewById(R.id.content_layout);
176 | RecyclerView recyclerView = findViewById(R.id.bottom_list);
177 | findViewById(R.id.scale).setOnClickListener(v -> {
178 | Toast.makeText(PanoViewActivity.this,
179 | "scale", Toast.LENGTH_SHORT).show();
180 | recyclerView.animate().translationY(0).start();
181 | layoutContent.animate().scaleX(0.8f).start();
182 | layoutContent.animate().scaleY(0.8f).start();
183 | cover.animate().alpha(1f).setListener(new AnimatorListenerAdapter() {
184 | @Override
185 | public void onAnimationEnd(Animator animation) {
186 | super.onAnimationEnd(animation);
187 | cover.setVisibility(View.VISIBLE);
188 |
189 | }
190 | }).start();
191 |
192 |
193 | });
194 |
195 | cover.setOnClickListener(v -> {
196 | Toast.makeText(PanoViewActivity.this,
197 | "cover", Toast.LENGTH_SHORT).show();
198 | recyclerView.animate().translationY(1000).start();
199 | layoutContent.animate().scaleX(1f).start();
200 | layoutContent.animate().scaleY(1f).start();
201 | cover.setVisibility(View.GONE);
202 | // cover.animate().alpha(0f).setListener(new AnimatorListenerAdapter() {
203 | // @Override
204 | // public void onAnimationEnd(Animator animation) {
205 | // super.onAnimationEnd(animation);
206 | //
207 | // cover.setOnClickListener(null);
208 | // }
209 | // }).start();
210 | });
211 |
212 |
213 | if (mPanoView != null && mPanoView.getChildCount() > 0) {
214 | if (mPanoView.getChildAt(0) instanceof SurfaceView) {
215 | mSurfaceView = (SurfaceView) mPanoView.getChildAt(0);
216 |
217 | Toast.makeText(this, "success", Toast.LENGTH_SHORT).show();
218 | }
219 |
220 | }
221 |
222 | }
223 |
224 | private void crop1() {
225 | final Bitmap bitmap = Bitmap.createBitmap(mPanoView.getWidth(), mPanoView.getHeight(), Bitmap.Config.ARGB_8888);
226 |
227 |
228 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
229 |
230 | PixelCopy.request(mSurfaceView, bitmap, copyResult -> {
231 | Log.e("xxx", "copyResult==" + copyResult);
232 | saveBitmap(bitmap);
233 |
234 | }, new Handler(Looper.getMainLooper()));
235 | }
236 | }
237 |
238 |
239 | public void saveBitmap(Bitmap bitmap) {
240 | if (bitmap == null) {
241 | Toast.makeText(this, "bitmap is null", Toast.LENGTH_SHORT).show();
242 | return;
243 | }
244 |
245 | String savePath;
246 | File filePic;
247 | if (Environment.getExternalStorageState().equals(
248 | Environment.MEDIA_MOUNTED)) {
249 | savePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath() + File.separator;
250 | } else {
251 | Log.e("xxx", "saveBitmap: 1return");
252 | return;
253 | }
254 |
255 |
256 | try {
257 | filePic = new File(savePath + System.currentTimeMillis() + ".jpg");
258 | if (!filePic.exists()) {
259 | filePic.getParentFile().mkdirs();
260 | filePic.createNewFile();
261 | }
262 | FileOutputStream fos = new FileOutputStream(filePic);
263 | bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
264 | fos.flush();
265 | fos.close();
266 | } catch (IOException e) {
267 | e.printStackTrace();
268 | Log.e("xxx", "saveBitmap: 2return");
269 | return;
270 | }
271 | Log.e("xxx", "saveBitmap: " + filePic.getAbsolutePath());
272 | }
273 |
274 |
275 | private void testPano() {
276 | handler = new MyHandler();
277 |
278 | mPanoView.setShowTopoLink(true);
279 |
280 |
281 |
282 |
283 | // 测试回调函数,需要注意的是回调函数要在setPanorama()之前调用,否则回调函数可能执行异常
284 | mPanoView.setPanoramaViewListener(new PanoramaViewListener() {
285 |
286 | @Override
287 | public void onLoadPanoramaBegin() {
288 | Log.i(LTAG, "onLoadPanoramaStart...");
289 | }
290 |
291 | @Override
292 | public void onLoadPanoramaEnd(String json) {
293 | // Log.e(LTAG, "onLoadPanoramaEnd : " + json);
294 | // startAuto();
295 | }
296 |
297 | @Override
298 | public void onLoadPanoramaError(String error) {
299 | // Log.e(LTAG, "onLoadPanoramaError : " + error);
300 |
301 | }
302 |
303 | @Override
304 | public void onDescriptionLoadEnd(String json) {
305 |
306 | PanoramaBean panoramaBean = JSON.parseObject(json, PanoramaBean.class);
307 |
308 | Point pointll = CoordinateConverter.MCConverter2LL(panoramaBean.getX(), panoramaBean.getY());
309 |
310 | HotCityPanoBean hotCityPanoBean = new HotCityPanoBean();
311 | hotCityPanoBean.setPid(pid);
312 | hotCityPanoBean.setName(name);
313 | hotCityPanoBean.setLatitude(pointll.y);
314 | hotCityPanoBean.setLongitude(pointll.x);
315 |
316 |
317 | Log.e(LTAG, "onDescriptionLoadEnd : " + hotCityPanoBean.getLatitude() + ", "
318 | + hotCityPanoBean.getLongitude() + "\n"
319 | + hotCityPanoBean.getName() + ", "
320 | + hotCityPanoBean.getPid());
321 |
322 |
323 | }
324 |
325 | @Override
326 | public void onMessage(String msgName, int msgType) {
327 | // Log.e(LTAG, "msgName--->" + msgName + ", msgType--->" + msgType);
328 | switch (msgType) {
329 | case 8213:
330 | //旋转
331 | // Log.e(PanoViewActivity.class.getSimpleName(), "now,the heading is " + mPanoView.getPanoramaHeading());
332 | Message message = new Message();
333 | message.what = ACTION_DRAG;
334 | message.arg1 = (int) mPanoView.getPanoramaHeading();
335 | handler.sendMessage(message);
336 | break;
337 | case 12302:
338 | //点击
339 | // Log.e(PanoViewActivity.class.getSimpleName(), "clicked");
340 | Message msg = new Message();
341 | msg.what = ACTION_CLICK;
342 | handler.sendMessage(msg);
343 | break;
344 | default:
345 | break;
346 | }
347 |
348 |
349 | }
350 |
351 | @Override
352 | public void onCustomMarkerClick(String key) {
353 |
354 | }
355 |
356 | @Override
357 | public void onMoveStart() {
358 |
359 | }
360 |
361 | @Override
362 | public void onMoveEnd() {
363 |
364 | }
365 | });
366 | mPanoView.setPanorama(longitude, latitude);
367 |
368 | }
369 |
370 | private void startAuto() {
371 | if (valueAnimator == null) {
372 | runOnUiThread(() -> {
373 | valueAnimator = ValueAnimator.ofFloat(0, 360);
374 | valueAnimator.addUpdateListener(animation -> {
375 | float value = (float) animation.getAnimatedValue();
376 | Log.e("zz", "value==" + value);
377 | mPanoView.setPanoramaHeading(value);
378 | });
379 | valueAnimator.setDuration(36000);
380 | valueAnimator.setInterpolator(new LinearInterpolator());
381 | valueAnimator.start();
382 | });
383 | }
384 |
385 |
386 | }
387 |
388 | @Override
389 | public int provideLayout() {
390 | return R.layout.panodemo_main;
391 | }
392 |
393 |
394 | private class MyHandler extends Handler {
395 |
396 |
397 | @Override
398 | public void handleMessage(Message msg) {
399 | super.handleMessage(msg);
400 |
401 | switch (msg.what) {
402 | case ACTION_CLICK:
403 | if (titleVisible) {
404 | titleVisible = false;
405 | mToolbbar.startAnimation(animationHide);
406 | // textTitle.setVisibility(View.GONE);
407 | } else {
408 | titleVisible = true;
409 | mToolbbar.startAnimation(animationShow);
410 | // textTitle.setVisibility(View.VISIBLE);
411 |
412 | }
413 |
414 | break;
415 | case ACTION_DRAG:
416 | float heading = (float) msg.arg1;
417 |
418 | mBaiduMap.clear();
419 |
420 | //构建MarkerOption,用于在地图上添加Marker
421 | option = new MarkerOptions()
422 | .position(point)
423 | .rotate(360 - heading)
424 | .icon(bitmap);
425 | //在地图上添加Marker,并显示
426 | mBaiduMap.addOverlay(option);
427 | break;
428 | default:
429 | break;
430 | }
431 | }
432 |
433 |
434 | }
435 |
436 |
437 | @Override
438 | protected void onDestroy() {
439 | mPanoView.destroy();
440 | super.onDestroy();
441 | //在activity执行onDestroy时执行mMapView.onDestroy(),实现地图生命周期管理
442 | mMapView.onDestroy();
443 | if (valueAnimator != null && valueAnimator.isRunning()) {
444 | valueAnimator.end();
445 | valueAnimator.removeAllUpdateListeners();
446 | valueAnimator = null;
447 | }
448 | }
449 |
450 | @Override
451 | protected void onResume() {
452 | super.onResume();
453 | //在activity执行onResume时执行mMapView. onResume (),实现地图生命周期管理
454 | mMapView.onResume();
455 | }
456 |
457 | @Override
458 | protected void onPause() {
459 | super.onPause();
460 | //在activity执行onPause时执行mMapView. onPause (),实现地图生命周期管理
461 | mMapView.onPause();
462 | }
463 |
464 |
465 | @SuppressLint("CheckResult")
466 | private void requestPermission() {
467 | RxPermissions rxPermissions = new RxPermissions(this);
468 | rxPermissions.request(Manifest.permission.WRITE_EXTERNAL_STORAGE)
469 | .subscribe(aBoolean -> {
470 | if (aBoolean) {
471 | crop1();
472 | }
473 | });
474 | }
475 | }
476 |
--------------------------------------------------------------------------------
/app/src/main/java/com/engineer/panorama/util/DeviceUtil.java:
--------------------------------------------------------------------------------
1 | package com.engineer.panorama.util;
2 |
3 | import android.app.Activity;
4 | import android.view.WindowManager;
5 |
6 | import java.lang.reflect.Field;
7 | import java.lang.reflect.Method;
8 |
9 | public class DeviceUtil {
10 |
11 | private static volatile Class> sMiuiClazz;
12 | private static volatile Field sMiuiField1;
13 | private static volatile Method sMiuiField2;
14 | private static boolean sMiuiError = false;
15 |
16 | /**
17 | * MIUI 系统中设置 StatusBar 的文本颜色为黑色
18 | */
19 | public static boolean setMIUIStatusBarLightMode(Activity activity, boolean lightmode) {
20 | if (sMiuiError) return false;
21 |
22 | boolean result = false;
23 | try {
24 | int darkModeFlag = 0;
25 | if (sMiuiClazz == null) {
26 | synchronized (DeviceUtil.class) {
27 | if (sMiuiClazz == null) {
28 | sMiuiClazz = Class.forName("android.view.MiuiWindowManager$LayoutParams");
29 | sMiuiField1 = sMiuiClazz.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
30 | sMiuiField2 = activity.getWindow().getClass()
31 | .getMethod("setExtraFlags", int.class, int.class);
32 | }
33 | }
34 | }
35 |
36 | darkModeFlag = sMiuiField1.getInt(sMiuiClazz);
37 | sMiuiField2.invoke(activity.getWindow(), lightmode ? darkModeFlag : 0, darkModeFlag);
38 | result = true;
39 | } catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException ignored) {
40 | sMiuiError = true;
41 | } catch (Exception ignored) {
42 | }
43 | return result;
44 | }
45 |
46 | private static volatile Field sFlymeField1;
47 | private static volatile Field sFlymeField2;
48 | private static boolean sFlymeError = false;
49 |
50 | /**
51 | * Flyme 系统中设置 StatusBar 的文本颜色为黑色
52 | */
53 | public static boolean setFlymeStatusBarLightMode(Activity activity, boolean lightmode) {
54 | if (sFlymeError) return false;
55 |
56 | boolean result = false;
57 | try {
58 | if (sFlymeField1 == null) {
59 | synchronized (DeviceUtil.class) {
60 | if (sFlymeField1 == null) {
61 | sFlymeField1 = WindowManager.LayoutParams.class
62 | .getDeclaredField("MEIZU_FLAG_DARK_STATUS_BAR_ICON");
63 | sFlymeField2 = WindowManager.LayoutParams.class
64 | .getDeclaredField("meizuFlags");
65 | sFlymeField1.setAccessible(true);
66 | sFlymeField2.setAccessible(true);
67 | }
68 | }
69 | }
70 |
71 | WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
72 |
73 | int bit = sFlymeField1.getInt(null);
74 | int value = sFlymeField2.getInt(lp);
75 | if (lightmode) {
76 | value |= bit;
77 | } else {
78 | value &= ~bit;
79 | }
80 | sFlymeField2.setInt(lp, value);
81 | activity.getWindow().setAttributes(lp);
82 | result = true;
83 | } catch (NoSuchFieldException ignored) {
84 | sFlymeError = true;
85 | } catch (Exception ignored) {
86 | }
87 | return result;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/app/src/main/java/com/engineer/panorama/util/FileUtil.java:
--------------------------------------------------------------------------------
1 | package com.engineer.panorama.util;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.os.Environment;
7 |
8 | import java.io.File;
9 | import java.io.FileNotFoundException;
10 | import java.io.FileOutputStream;
11 | import java.io.IOException;
12 | import java.io.InputStream;
13 | import java.io.OutputStream;
14 |
15 | /**
16 | * Created by rookie on 2016/11/10.
17 | *
18 | * 文件读取工具类
19 | */
20 |
21 |
22 | public class FileUtil {
23 | /**
24 | * 保存bitmap到本地
25 | *
26 | * @param bitmap
27 | * @param name
28 | * @return
29 | */
30 | public static String savaBitmap2SDcard(Context context, Bitmap bitmap, String name) {
31 |
32 | String result = "";
33 | File fileDir = new File(Environment.getExternalStorageDirectory() + File.separator + "DCIM" + File.separator + "Camera" + File.separator);
34 | if (!fileDir.exists()) {
35 | fileDir.mkdir();
36 | }
37 | String filename = name + ".jpg";
38 | File file = new File(fileDir, filename);
39 | FileOutputStream outputStream = null;
40 | try {
41 | outputStream = new FileOutputStream(file);
42 | bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);
43 | outputStream.flush();
44 | result = file.getAbsolutePath();
45 | } catch (FileNotFoundException e) {
46 | e.printStackTrace();
47 | } catch (IOException e) {
48 | e.printStackTrace();
49 | } finally {
50 | if (outputStream != null) {
51 | try {
52 | outputStream.close();
53 | } catch (IOException e) {
54 | e.printStackTrace();
55 | }
56 | }
57 | }
58 | return result;
59 | }
60 |
61 | /**
62 | * 获取bitmap
63 | *
64 | * @param filename
65 | * @return
66 | */
67 | public static Bitmap getBitmapFormSDcard(String filename) {
68 | Bitmap bitmap;
69 | String filepath = Environment.getExternalStorageDirectory() + File.separator + "Screenshots" + File.separator + filename;
70 | bitmap = BitmapFactory.decodeFile(filepath);
71 | return bitmap;
72 | }
73 |
74 |
75 | /**
76 | * 从本地assets 文件读取 json 文件,模拟网络请求结果
77 | *
78 | * @return
79 | */
80 | public static String getLocalResponse(Context mContext, String FileName) {
81 |
82 | String result = "";
83 |
84 | try {
85 | InputStream inputStream = mContext.getAssets().open(FileName);
86 | StringBuffer sb = new StringBuffer();
87 | int len = -1;
88 | byte[] buffer = new byte[1024];
89 | while ((len = inputStream.read(buffer)) != -1) {
90 | sb.append(new String(buffer, 0, len));
91 | }
92 | inputStream.close();
93 | result = sb.toString();
94 | } catch (IOException e) {
95 | e.printStackTrace();
96 | }
97 |
98 | return result;
99 | }
100 |
101 | /**
102 | * 保存String 到手机存储
103 | *
104 | * @param str
105 | * @param fileName
106 | * @return
107 | */
108 | public static boolean saveStrToSDCard(String str, String fileName) {
109 | boolean success = false;
110 | if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
111 | String path = Environment.getExternalStorageDirectory() + File.separator + fileName;
112 |
113 | File file = new File(path);
114 | try {
115 | OutputStream os = new FileOutputStream(file);
116 | byte[] b = str.getBytes();
117 | os.write(b);
118 | os.close();
119 | success = true;
120 | } catch (FileNotFoundException e) {
121 | e.printStackTrace();
122 | } catch (IOException e) {
123 | e.printStackTrace();
124 | }
125 |
126 | }
127 |
128 |
129 | return success;
130 | }
131 |
132 | }
133 |
--------------------------------------------------------------------------------
/app/src/main/java/com/engineer/panorama/util/NotificationHelper.java:
--------------------------------------------------------------------------------
1 | package com.engineer.panorama.util;
2 |
3 | import android.app.NotificationChannel;
4 | import android.app.NotificationManager;
5 | import android.app.PendingIntent;
6 | import android.content.Context;
7 | import android.graphics.Color;
8 | import android.provider.Settings;
9 | import androidx.core.app.NotificationCompat;
10 |
11 | import com.engineer.panorama.R;
12 |
13 |
14 | /**
15 | * @author: Rookie
16 | * @date: 2018-08-26
17 | * @desc
18 | */
19 | public class NotificationHelper {
20 |
21 | private Context mContext;
22 | private NotificationManager mNotificationManager;
23 | private NotificationCompat.Builder mBuilder;
24 | public static final String NOTIFICATION_CHANNEL_ID = "10001";
25 |
26 | public NotificationHelper(Context context) {
27 | mContext = context;
28 | }
29 |
30 | /**
31 | * Create and push the notification
32 | */
33 | public void createNotification(String title, String message, PendingIntent resultPendingIntent) {
34 | /**Creates an explicit intent for an Activity in your app**/
35 |
36 | mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
37 |
38 | if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
39 | int importance = NotificationManager.IMPORTANCE_HIGH;
40 | NotificationChannel notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, "NOTIFICATION_CHANNEL_NAME", importance);
41 | notificationChannel.enableLights(true);
42 | notificationChannel.setLightColor(Color.RED);
43 | notificationChannel.enableVibration(true);
44 | notificationChannel.setVibrationPattern(new long[]{100, 200, 300, 400});
45 | mNotificationManager.createNotificationChannel(notificationChannel);
46 |
47 | }
48 |
49 | mBuilder = new NotificationCompat.Builder(mContext, NOTIFICATION_CHANNEL_ID);
50 | mBuilder.setSmallIcon(R.drawable.ic_launcher);
51 | mBuilder.setContentTitle(title)
52 | .setContentText(message)
53 | .setAutoCancel(true)
54 | .setSound(Settings.System.DEFAULT_NOTIFICATION_URI)
55 | .setContentIntent(resultPendingIntent)
56 | .setWhen(System.currentTimeMillis())
57 | .setTicker("下载图片成功")
58 | .setOngoing(false);
59 |
60 | assert mNotificationManager != null;
61 | mBuilder.setChannelId(NOTIFICATION_CHANNEL_ID);
62 |
63 |
64 | assert mNotificationManager != null;
65 | mNotificationManager.notify(0 , mBuilder.build());
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/java/com/engineer/panorama/util/SavePhotoTask.java:
--------------------------------------------------------------------------------
1 | package com.engineer.panorama.util;
2 |
3 | import android.app.PendingIntent;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.net.Uri;
7 | import android.os.AsyncTask;
8 | import android.os.Build;
9 | import android.os.Environment;
10 | import androidx.core.content.FileProvider;
11 | import android.text.TextUtils;
12 | import android.widget.Toast;
13 |
14 |
15 | import com.engineer.panorama.util.NotificationHelper;
16 |
17 | import java.io.File;
18 | import java.io.FileOutputStream;
19 | import java.io.IOException;
20 | import java.io.InputStream;
21 | import java.io.OutputStream;
22 | import java.net.HttpURLConnection;
23 | import java.net.URL;
24 | import java.text.SimpleDateFormat;
25 | import java.util.Date;
26 | import java.util.Locale;
27 |
28 | /**
29 | * Created by engineer on 2017/8/20.
30 | */
31 |
32 | public class SavePhotoTask extends AsyncTask {
33 |
34 | private Context mContext;
35 |
36 |
37 | public SavePhotoTask(Context context) {
38 | mContext = context;
39 | }
40 |
41 | @Override
42 | protected void onPostExecute(String filepath) {
43 | super.onPostExecute(filepath);
44 |
45 |
46 | if (!TextUtils.isEmpty(filepath)) {
47 |
48 |
49 | Toast.makeText(mContext, "保存图片成功", Toast.LENGTH_SHORT).show();
50 |
51 |
52 | Intent mIntent = new Intent();
53 | mIntent.setAction(Intent.ACTION_VIEW);
54 | Uri contentUri;
55 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
56 | // 将文件转换成content://Uri的形式
57 | contentUri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", new File(filepath));
58 | // 申请临时访问权限
59 | mIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
60 | } else {
61 | contentUri = Uri.fromFile(new File(filepath));
62 | }
63 |
64 | mIntent.setDataAndType(contentUri, "image/*");
65 | // startActivity(mIntent);
66 | PendingIntent mPendingIntent = PendingIntent.getActivity(mContext
67 | , 0, mIntent, PendingIntent.FLAG_UPDATE_CURRENT);
68 |
69 | new NotificationHelper(mContext).createNotification("点击查看", "图片保存在: " + filepath, mPendingIntent);
70 | } else {
71 | Toast.makeText(mContext, "保存图片失败", Toast.LENGTH_SHORT).show();
72 | }
73 | }
74 |
75 | @Override
76 | protected void onPreExecute() {
77 | super.onPreExecute();
78 |
79 | }
80 |
81 |
82 |
83 |
84 | @Override
85 | protected String doInBackground(String... params) {
86 |
87 | try {
88 |
89 | String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.CHINA).format(new Date());
90 | String fileName = "IMG_" + timeStamp + ".jpg";
91 | File localFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + File.separator + fileName);
92 | OutputStream mOutputStream = new FileOutputStream(localFile);
93 | URL url = new URL(params[0]);
94 | HttpURLConnection mConnection = (HttpURLConnection) url.openConnection();
95 | InputStream mInputStream = mConnection.getInputStream();
96 | int len;
97 | byte[] buffer = new byte[1024];
98 | while ((len = mInputStream.read(buffer)) != -1) {
99 | mOutputStream.write(buffer, 0, len);
100 | }
101 | mOutputStream.flush();
102 | mInputStream.close();
103 | mOutputStream.close();
104 | return localFile.getAbsolutePath();
105 | } catch (IOException e) {
106 | e.printStackTrace();
107 | return "";
108 | }
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/app/src/main/java/com/engineer/panorama/util/ScreenView.java:
--------------------------------------------------------------------------------
1 | package com.engineer.panorama.util;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.Canvas;
6 | import android.graphics.Color;
7 | import android.graphics.Paint;
8 | import android.graphics.RectF;
9 | import android.view.SurfaceHolder;
10 |
11 | import com.baidu.pano.platform.comapi.map.InnerPanoramaView;
12 |
13 | /**
14 | * @author: Rookie
15 | * @since: 2018-11-25
16 | */
17 | public abstract class ScreenView extends InnerPanoramaView implements SurfaceHolder.Callback, Runnable {
18 |
19 | private SurfaceHolder mSurfaceHolder;
20 | private Thread mThread;
21 |
22 | public ScreenView(Context context) {
23 | super(context);
24 | mSurfaceHolder = this.getHolder();
25 | mSurfaceHolder.addCallback(this);
26 | }
27 |
28 | @Override
29 | public void surfaceCreated(SurfaceHolder holder) {
30 | mThread = new Thread(this);
31 | }
32 |
33 | @Override
34 | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
35 | }
36 |
37 | @Override
38 | public void surfaceDestroyed(SurfaceHolder holder) {
39 |
40 | }
41 |
42 | public void start() {
43 | if (mThread != null) {
44 | mThread.start();
45 | }
46 | }
47 |
48 | @Override
49 | public void run() {
50 | Canvas canvas = mSurfaceHolder.lockCanvas();
51 | doDraw(canvas);
52 | mSurfaceHolder.unlockCanvasAndPost(canvas);
53 | }
54 |
55 | private void doDraw(Canvas canvas) {
56 | Paint mPaint = new Paint();
57 | mPaint.setColor(Color.BLUE);
58 | canvas.drawRect(new RectF(100, 100, 1000, 550), mPaint);
59 | }
60 |
61 | //调用该方法将doDraw绘制的图案绘制在自己的canvas上
62 | public Bitmap getBitmap() {
63 | Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
64 | Canvas canvas = new Canvas(bitmap);
65 | doDraw(canvas);
66 | return bitmap;
67 | }
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/engineer/panorama/util/SystemExt.kt:
--------------------------------------------------------------------------------
1 | package com.engineer.panorama.util
2 |
3 | import android.content.Context
4 | import android.content.res.Configuration
5 | import android.content.res.Resources
6 |
7 | /**
8 | * Created on 2020/9/5.
9 | * @author rookie
10 | */
11 |
12 |
13 | val Number.dp get() = (toInt() * Resources.getSystem().displayMetrics.density).toInt()
14 |
15 | val Number.sp get() = (toInt() * Resources.getSystem().displayMetrics.scaledDensity)
16 |
17 | fun T.easy(block: (T) -> R, ifNull: () -> Unit) {
18 | if (this != null) {
19 | block(this)
20 | } else {
21 | ifNull()
22 | }
23 | }
24 |
25 |
26 | fun Context.getNightMode(): Int {
27 | return this.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
28 | }
29 |
30 | val screenWidth = Resources.getSystem().displayMetrics.widthPixels
31 | val screenHeight = Resources.getSystem().displayMetrics.heightPixels
--------------------------------------------------------------------------------
/app/src/main/res/anim/pop_hidden_animation.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pop_show_animation.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/baidupano_floortab_arrow.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/baidupano_floortab_arrow.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/baidupano_floortab_line.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/baidupano_floortab_line.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/baidupano_indoor_exit.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/baidupano_indoor_exit.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/baidupano_photo_default.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/baidupano_photo_default.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/button_down.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/button_down.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/button_on.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/button_on.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/checkout_pano_arrow.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/checkout_pano_arrow.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/icon_marka.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/icon_marka.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/icon_markb.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/icon_markb.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/icon_markc.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/icon_markc.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/pano_image_background.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/pano_image_background.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/pano_image_background_tip.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/pano_image_background_tip.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/splash.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/splash.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/street_arrow.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/street_arrow.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/wsdk_checkout_pano_arrow.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/wsdk_checkout_pano_arrow.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/wsdk_pano_image_background.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/wsdk_pano_image_background.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/wsdk_pano_image_background_tip.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/app/src/main/res/drawable-xxxhdpi/wsdk_pano_image_background_tip.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baidupano_shape_photocase.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | -
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baidupano_shape_photocase_selc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baidupano_shape_phototxt_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_view_list_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_crop_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_format_list_bulleted_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_more_vert_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_full.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_google_maps.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_list_pano_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
19 |
20 |
26 |
27 |
33 |
34 |
40 |
41 |
47 |
48 |
54 |
55 |
61 |
62 |
68 |
69 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_mapview.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_multi_pano_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_pano_pager.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/baidupano_photoalbum_container.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
23 |
24 |
29 |
30 |
31 |
32 |
39 |
40 |
41 |
42 |
50 |
51 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/baidupano_singlephoto_layout.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
17 |
18 |
26 |
27 |
35 |
36 |
49 |
50 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item_mapview.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pager_pano_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pano_overlay.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
27 |
28 |
35 |
36 |
43 |
44 |
51 |
52 |
53 |
54 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/panodemo.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/panodemo_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
17 |
20 |
21 |
27 |
28 |
36 |
37 |
43 |
44 |
45 |
46 |
47 |
53 |
54 |
63 |
64 |
74 |
75 |
86 |
87 |
96 |
97 |
107 |
108 |
109 |
110 |
111 |
117 |
118 |
126 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Panorama
5 | 打开全景
6 | 坐标转换
7 | 通过百度全景ID(PID)获取全景
8 | 通过百度经纬度坐标获取全景
9 | 通过百度墨卡托坐标获取全景
10 | 通过百度地图UID获取外景
11 | 通过百度地图UID获取内景
12 | 通过百度地图UID获取外景(自定义相册)
13 | 添加自定义标注到全景图
14 | 其他全景参数设置
15 | 高德, 腾讯, 谷歌坐标转换百度坐标
16 | 基础地图展示
17 | Map
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
23 |
24 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/release/res/values/google_maps_api.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 | YOUR_KEY_HERE
20 |
--------------------------------------------------------------------------------
/baidu_map_sdk/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/baidu_map_sdk/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.library'
3 | id 'kotlin-android'
4 | }
5 |
6 | android {
7 | compileSdk 34
8 |
9 | namespace 'com.engineer.android.baidu.map.sdk'
10 | defaultConfig {
11 | minSdkVersion 21
12 | targetSdkVersion 34
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | consumerProguardFiles "consumer-rules.pro"
18 | }
19 |
20 | buildTypes {
21 | release {
22 | minifyEnabled false
23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 | compileOptions {
27 | sourceCompatibility JavaVersion.VERSION_1_8
28 | targetCompatibility JavaVersion.VERSION_1_8
29 | }
30 | kotlinOptions {
31 | jvmTarget = '1.8'
32 | }
33 |
34 | sourceSets {
35 | main {
36 | jniLibs.srcDirs = ['libs']
37 | }
38 | }
39 | }
40 |
41 | dependencies {
42 | api fileTree(include: ['*.jar','*.aar'], dir: 'libs')
43 | }
--------------------------------------------------------------------------------
/baidu_map_sdk/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/consumer-rules.pro
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/BaiduLBS_android.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/BaiduLBS_android.aar
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/NaviTts.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/NaviTts.aar
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libBDSpeechDecoder_V1.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libBDSpeechDecoder_V1.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libBaiduMapSDK_base_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libBaiduMapSDK_base_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libBaiduMapSDK_map_for_navi_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libBaiduMapSDK_map_for_navi_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libapp_BaiduNaviApplib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libapp_BaiduNaviApplib.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libapp_BaiduPanoramaAppLib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libapp_BaiduPanoramaAppLib.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libbd_etts.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libbd_etts.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libcrypto.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libgnustl_shared.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libindoor.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libindoor.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/liblocSDK8a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/liblocSDK8a.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/arm64-v8a/libssl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/arm64-v8a/libssl.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libBDSpeechDecoder_V1.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libBDSpeechDecoder_V1.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libBaiduMapSDK_base_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libBaiduMapSDK_base_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libBaiduMapSDK_map_for_navi_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libBaiduMapSDK_map_for_navi_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libapp_BaiduNaviApplib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libapp_BaiduNaviApplib.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libapp_BaiduPanoramaAppLib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libapp_BaiduPanoramaAppLib.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libbd_etts.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libbd_etts.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libcrypto.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libgnustl_shared.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libindoor.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libindoor.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/liblocSDK8a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/liblocSDK8a.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi-v7a/libssl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi-v7a/libssl.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi/libBaiduMapSDK_base_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi/libBaiduMapSDK_base_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi/libBaiduMapSDK_map_for_navi_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi/libBaiduMapSDK_map_for_navi_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi/libapp_BaiduPanoramaAppLib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi/libapp_BaiduPanoramaAppLib.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi/libcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi/libcrypto.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi/libgnustl_shared.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi/libindoor.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi/libindoor.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi/liblocSDK8a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi/liblocSDK8a.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/armeabi/libssl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/armeabi/libssl.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/javapoet-1.9.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/javapoet-1.9.0.jar
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/onsdk_all.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/onsdk_all.aar
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86/libBaiduMapSDK_base_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86/libBaiduMapSDK_base_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86/libBaiduMapSDK_map_for_navi_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86/libBaiduMapSDK_map_for_navi_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86/libapp_BaiduPanoramaAppLib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86/libapp_BaiduPanoramaAppLib.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86/libcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86/libcrypto.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86/libgnustl_shared.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86/libindoor.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86/libindoor.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86/liblocSDK8a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86/liblocSDK8a.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86/libssl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86/libssl.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86_64/libBaiduMapSDK_base_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86_64/libBaiduMapSDK_base_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86_64/libBaiduMapSDK_map_for_navi_v7_0_0.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86_64/libBaiduMapSDK_map_for_navi_v7_0_0.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86_64/libapp_BaiduPanoramaAppLib.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86_64/libapp_BaiduPanoramaAppLib.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86_64/libcrypto.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86_64/libcrypto.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86_64/libgnustl_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86_64/libgnustl_shared.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86_64/libindoor.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86_64/libindoor.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86_64/liblocSDK8a.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86_64/liblocSDK8a.so
--------------------------------------------------------------------------------
/baidu_map_sdk/libs/x86_64/libssl.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/baidu_map_sdk/libs/x86_64/libssl.so
--------------------------------------------------------------------------------
/baidu_map_sdk/proguard-navi.pro:
--------------------------------------------------------------------------------
1 | # BaiduNavi SDK
2 | -dontoptimize
3 | -ignorewarnings
4 | -keeppackagenames com.baidu.**
5 | -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod
6 |
7 | -dontwarn com.baidu.**
8 | -dontwarn com.baidu.navisdk.**
9 | -dontwarn com.baidu.navi.**
10 |
11 | -keep class com.baidu.** { *; }
12 | -keep interface com.baidu.** { *; }
13 | -keep class com.baidu.**$** { *; }
14 | -keep interface com.baidu.**$** { *; }
15 |
16 | -keep class vi.com.gdi.** { *; }
17 |
18 | -dontwarn com.google.protobuf.**
19 | -keep class com.google.protobuf.** { *;}
20 | -keep interface com.google.protobuf.** { *;}
21 |
22 | -dontwarn com.google.android.support.v4.**
23 | -keep class com.google.android.support.v4.** { *; }
24 | -keep interface com.google.android.support.v4.app.** { *; }
25 | -keep public class * extends com.google.android.support.v4.**
26 | -keep public class * extends com.google.android.support.v4.app.Fragment
27 |
28 |
--------------------------------------------------------------------------------
/baidu_map_sdk/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
23 | -keep class com.baidu.** {*;}
24 | -keep class vi.com.** {*;}
25 | -keep class com.baidu.vi.** {*;}
26 |
27 | -dontwarn com.baidu.**
--------------------------------------------------------------------------------
/baidu_map_sdk/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | ext.kotlin_version = '1.9.20'
4 |
5 | repositories {
6 | // maven { url 'https://maven.aliyun.com/repository/jcenter' }
7 | // maven { url 'https://maven.aliyun.com/repository/google' }
8 | google()
9 | mavenCentral()
10 | gradlePluginPortal()
11 | maven { url 'https://jitpack.io' }
12 | }
13 | dependencies {
14 | classpath 'com.android.tools.build:gradle:8.4.0'
15 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | // maven { url 'https://maven.aliyun.com/repository/jcenter' }
21 | // maven { url 'https://maven.aliyun.com/repository/google' }
22 | maven { url 'https://jitpack.io' }
23 | // jcenter()
24 | // google()
25 | google()
26 | mavenCentral()
27 | gradlePluginPortal()
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | android.useAndroidX=true
2 | android.enableJetifier=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/REBOOTERS/AndroidPanoramaSample/8ea1812c78dffdd18f50b49c030789a510ac60f3/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Oct 17 15:53:04 CST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':baidu_map_sdk'
2 | include ':app'
3 |
4 |
5 |
--------------------------------------------------------------------------------