android-api-levels

Permission Denial: Couln't attach file, File requires the provider be exported, or grantUriPermission(), API 29

北城以北 提交于 2020-06-28 03:55:16
问题 I have been trying to share one image from external storage and it is not working in API 29. the error message is: Permission denial, the file requires the provider be exported, or grantUriPermission(). when I google it it seems to be a problem to old versions. I don't know why i’m having this problem with 29 API. I have used all the solutions related to grantUriPermission(), as you can see in my method: private fun shareInEmail() { val filename = "Avoir+$timeStamp.jpg" val filelocation =

How to check if the Battery Saver Mode is enabled on Android < 5.0?

旧街凉风 提交于 2020-06-13 17:44:33
问题 As I know, there are some devices with version < 5.0 that have the Power Saver option. An answer provided in this similar question is not correct and doesn't explain anything. On Android 5.0+ we can use this script here: PowerManager powerManager = (PowerManager) this.getSystemService(Context.POWER_SERVICE); if ( powerManager.isPowerSaveMode()) { //code } My question is: is there a universal way to check if there IS a power saver mode and if it's enabled/disabled on API < 21? 回答1: For KitKat

How to find which API level an Android class has been introduced?

谁说我不能喝 提交于 2020-03-23 12:04:17
问题 I created a new Android project, targeting API 15 and using androidx . The autogenerated Hello world is: package com.example.myapplication; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } Adding import androidx.webkit.WebViewAssetLoader to it fails with Cannot resolve

How to find which API level an Android class has been introduced?

放肆的年华 提交于 2020-03-23 12:03:05
问题 I created a new Android project, targeting API 15 and using androidx . The autogenerated Hello world is: package com.example.myapplication; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } Adding import androidx.webkit.WebViewAssetLoader to it fails with Cannot resolve

how to save image,gif and music in android studio

喜你入骨 提交于 2020-02-25 22:29:44
问题 I have tried this code, public class PhotoEditing extends AppCompatActivity implements GetGifAdapter.GlideInterface, SdCardSongAdapter.MediaInterface , FiltersListFragmentListener, EmojiFragmentListener, AddTextFragmentListener { PhotoEditorView image_preview; ImageView image_gif/*,image_preview*/; ImageView save, back; LinearLayout linearLayout; public String sessionId; Uri image_selected_uri; FFmpeg ffmpeg; public Bitmap originalBitmap, filterdBitmap, finalBitmap; LinearLayout btn_music

how to save image,gif and music in android studio

天涯浪子 提交于 2020-02-25 22:25:50
问题 I have tried this code, public class PhotoEditing extends AppCompatActivity implements GetGifAdapter.GlideInterface, SdCardSongAdapter.MediaInterface , FiltersListFragmentListener, EmojiFragmentListener, AddTextFragmentListener { PhotoEditorView image_preview; ImageView image_gif/*,image_preview*/; ImageView save, back; LinearLayout linearLayout; public String sessionId; Uri image_selected_uri; FFmpeg ffmpeg; public Bitmap originalBitmap, filterdBitmap, finalBitmap; LinearLayout btn_music

Error inflating class android.support.design.widget.FloatingActionButton in Android

南楼画角 提交于 2019-12-29 01:15:13
问题 When I'm trying to build the application it will show the android.view.InflateException in FloatingActionButton? I really don't know what causes the error. Login.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android

How to choose target API level when creating a new project in Android Studio?

这一生的挚爱 提交于 2019-12-25 14:13:31
问题 I am new to android development and Android Studio. I also have a physical device which runs android version 5.0.1. When I try to debug an app from Android Studio on my device I don't get the behavior as in the emulator. My project's target API level (when I create it) is always 23 (Android 6.0 Marshmallow). Although the minimum API level is 17 (Android 4.2 Jelly Bean) I want to know how to set the target API level on project creation. Is this possible with the current version of Android

Is there any advantage to not updating target NDK platform?

亡梦爱人 提交于 2019-12-24 04:42:09
问题 I'm maintaining a (relatively) old Android application that uses NDK built library for some functions. It was originally built for NDK platform level 9. I've been trying to modernize the build infrastructure and as part of that I'm using updated SDK and NDK releases, which dropped support for NDK platform 9 (the minimal version is now 16). Is there any advantage to not updating the target NDK we build against, and/or not updating to the latest NDK platform level (currently 28), or is it