android

Android Google Maps/Earth opening Local KML/KMZ file and play the tour functionality

人盡茶涼 提交于 2021-02-19 07:40:48
问题 Is there a way to open a local KML/KMZ file in Google Maps/Earth app on Android? Tried the below approach but didn't work. Intent mapIntent = new Intent(Intent.ACTION_VIEW); Uri uri1 = Uri .parse("geo:0,0?q=file:///mnt/sdcard/doc.kml"); mapIntent.setData(uri1); startActivity(Intent.createChooser(mapIntent, "Sample")); If not and if we can specify only links that are hosted on the web then can we specify a link to the Google Drive file to show directly on Google Maps/Earth? Intent mapIntent =

Saving State of Multiple Checkboxes - Android

↘锁芯ラ 提交于 2021-02-19 07:32:48
问题 I am able to save the state of a Single CheckBox but how do i save All the Five CheckBoxes in my Activity? checkBox = (CheckBox) findViewById(R.id.checkBox1); boolean isChecked = getBooleanFromPreferences("isChecked"); Log.i("start",""+isChecked); checkBox.setChecked(isChecked); checkBox.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton view, boolean isChecked) { Log.i("boolean",""+isChecked); Settings.this.putBooleanInPreferences

MPAndroidChart: Change Shape of Bar Chart

不打扰是莪最后的温柔 提交于 2021-02-19 07:24:18
问题 i already read answers of question that similar to mine. but, i don't understand and i think that's so complex. maybe some of you have a trick how to make it simple. i am using 'com.github.PhilJay:MPAndroidChart:v2.2.4' library, btw. i want to make a bar chart style like this picture. the corner of rectangle has radius about 4dp . i haven't found any method to draw that. 回答1: Looks like there is no way to make it simple. Finally I came up with a clumsy, but working solution which worked well

MPAndroidChart: Change Shape of Bar Chart

家住魔仙堡 提交于 2021-02-19 07:22:38
问题 i already read answers of question that similar to mine. but, i don't understand and i think that's so complex. maybe some of you have a trick how to make it simple. i am using 'com.github.PhilJay:MPAndroidChart:v2.2.4' library, btw. i want to make a bar chart style like this picture. the corner of rectangle has radius about 4dp . i haven't found any method to draw that. 回答1: Looks like there is no way to make it simple. Finally I came up with a clumsy, but working solution which worked well

sqlite.SQLiteException: near “s”: syntax error: because of apostrophe

杀马特。学长 韩版系。学妹 提交于 2021-02-19 07:14:26
问题 The song name that I want to insert it into my table contains a " ' " (apostrophe )so , there is an error when the request is excuted. How can I fix it Cursor pid = mDB.rawQuery("select Id FROM MusicPlayer WHERE "Path ='" + sname + "';", null); I am getting sname runtime so .. sname= /mnt/sdcard/Now Thats What I Call Music 85 [Bubanee]/16 - Let's Get Ready To Rhumble (100% Radio Mix) - PJ & Duncan.mp3 I get below error.. android.database.sqlite.SQLiteException: near "s": syntax error: , while

sqlite.SQLiteException: near “s”: syntax error: because of apostrophe

会有一股神秘感。 提交于 2021-02-19 07:13:34
问题 The song name that I want to insert it into my table contains a " ' " (apostrophe )so , there is an error when the request is excuted. How can I fix it Cursor pid = mDB.rawQuery("select Id FROM MusicPlayer WHERE "Path ='" + sname + "';", null); I am getting sname runtime so .. sname= /mnt/sdcard/Now Thats What I Call Music 85 [Bubanee]/16 - Let's Get Ready To Rhumble (100% Radio Mix) - PJ & Duncan.mp3 I get below error.. android.database.sqlite.SQLiteException: near "s": syntax error: , while

Soft Keyboard not displaying on touch in WebView DialogFragment

半腔热情 提交于 2021-02-19 07:09:08
问题 Edit: I have looked at the error page for this; no answers work. It seems it is an Android system bug that has not yet been solved. First off I've referred to this similar question. But the solution to that question does not seem to be the solution to mine. I have a DialogFragment that contains only a WebView . Everything in the WebView seems to be touchable. However, the problem is that when I touch a form field, the cursor appears but the soft keyboard never shows up! Here's my code in the

Soft Keyboard not displaying on touch in WebView DialogFragment

試著忘記壹切 提交于 2021-02-19 07:07:24
问题 Edit: I have looked at the error page for this; no answers work. It seems it is an Android system bug that has not yet been solved. First off I've referred to this similar question. But the solution to that question does not seem to be the solution to mine. I have a DialogFragment that contains only a WebView . Everything in the WebView seems to be touchable. However, the problem is that when I touch a form field, the cursor appears but the soft keyboard never shows up! Here's my code in the

Saving photos and videos using Android FileProvider to the gallery

杀马特。学长 韩版系。学妹 提交于 2021-02-19 06:54:06
问题 My application (using SDK less than 24) can take photos and video using the camera. The photos and videos can be viewed in the gallery outside the app. SDK 24 and above requires FileProvider to create the uri for saving the photo or video to the gallery. Prior to SDK 24 I would use a uri and an intent to take a photo: private void openCameraForResult(int requestCode){ Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); picturesDirectoryPhotoFileName = nextFileName(); File photoFile =