android-5.1.1-lollipop

How to display image with intent.ACTION_VIEW

拈花ヽ惹草 提交于 2021-02-18 18:56:37
问题 My grammar can run at android 5.1 but is not working at android 7.1.... File file = new File(Environment.getExternalStorageDirectory(), "Pictures/1481853170451.jpg"); Toast.makeText(MainActivity.this, file.getPath(), Toast.LENGTH_LONG).show(); Uri path = Uri.fromFile(file); if (file.exists()) { Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(path, "image/*"); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); try { this.startActivity

How to display image with intent.ACTION_VIEW

一曲冷凌霜 提交于 2021-02-18 18:56:23
问题 My grammar can run at android 5.1 but is not working at android 7.1.... File file = new File(Environment.getExternalStorageDirectory(), "Pictures/1481853170451.jpg"); Toast.makeText(MainActivity.this, file.getPath(), Toast.LENGTH_LONG).show(); Uri path = Uri.fromFile(file); if (file.exists()) { Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(path, "image/*"); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); try { this.startActivity

Droid API 22+ options for Date/Duration (in Kotlin)?

China☆狼群 提交于 2020-06-29 04:43:45
问题 I'm porting an iOS app to Android, target API 22. I do a bunch of Date/TimeInterval stuff. I do it all in UTC so it just works for me. I'm struggling with what to use for Android. There's Date (from the beginning of time, ha ha). I guess I could do duration math by converting to/from the time milliseconds attribute. It's not clear to me what zone/rules apply to those. I see people who seem to use Calendars as Date objects and pass those around. That seems a bit off. And then there's the new

boolean android.net.NetworkInfo.isConnectedOrConnecting() is not working in Android 5.1.1

倾然丶 夕夏残阳落幕 提交于 2020-04-15 17:13:24
问题 I am working on an Android Tablet Application, I am checking Internet connectivity within an Activity named "Home". I have tested the app in Android version 4.2 (Tablet), 4.4 (Tablet), 5.0 (Phone), 5.0.2 (Phone), the app is working fine. Problem: When I tested the app in Android 5.1.1 (Tablet), app is being forced close. Its showing following error in log. Log: 2015-07-27 05:36:19.312 ERROR: AndroidRuntime : java.lang.RuntimeException: Unable to start activity ComponentInfo{com.freestyle/com

boolean android.net.NetworkInfo.isConnectedOrConnecting() is not working in Android 5.1.1

扶醉桌前 提交于 2020-04-15 17:12:47
问题 I am working on an Android Tablet Application, I am checking Internet connectivity within an Activity named "Home". I have tested the app in Android version 4.2 (Tablet), 4.4 (Tablet), 5.0 (Phone), 5.0.2 (Phone), the app is working fine. Problem: When I tested the app in Android 5.1.1 (Tablet), app is being forced close. Its showing following error in log. Log: 2015-07-27 05:36:19.312 ERROR: AndroidRuntime : java.lang.RuntimeException: Unable to start activity ComponentInfo{com.freestyle/com

Is it possible to hide some system notifications? (lollipop) [duplicate]

馋奶兔 提交于 2020-03-05 00:28:38
问题 This question already exists : is it possible to hide some system notifications? [closed] Closed 19 days ago . i would like to hide some notifications becouse they just do not need to be there is it possible to hide these notifications? I do not mind if solution will be programatic or just somewhere at system... but i do not thing that that is possible at android lollipop. So i would like to ask if there is any non rooted code which let me hide these 2 not needed notifications about simcsrd

Is it possible to hide some system notifications? (lollipop) [duplicate]

两盒软妹~` 提交于 2020-03-05 00:27:44
问题 This question already exists : is it possible to hide some system notifications? [closed] Closed 19 days ago . i would like to hide some notifications becouse they just do not need to be there is it possible to hide these notifications? I do not mind if solution will be programatic or just somewhere at system... but i do not thing that that is possible at android lollipop. So i would like to ask if there is any non rooted code which let me hide these 2 not needed notifications about simcsrd

xamarin Visual Studio 2015 apk fails to install: Error “parsing the package”

耗尽温柔 提交于 2020-01-05 08:03:27
问题 Wrote app for an android device whose installed Android version is Lollipop 5.1 (AZPEN A1040 tablet - latest version available for it). The app installs and works correctly in the emulator (setup to emulate a Lollipop 5.1 device) However, after archiving without any issues, when attempting to install the app's apk file to the actual target device, I get the following error: "There was a problem parsing the package" The project's properties in Visual Studio 2015 are displayed in the graphics

Receive broadcasts in stopped application

可紊 提交于 2020-01-02 08:22:51
问题 By default, an application which in stopped state (not yet run even once) could not receive broadcasts . There is a way to receive it if we add the flag FLAG_INCLUDE_STOPPED_PACKAGES to the broadcast intent. My problem is that I need to receive system intent android.intent.action.MEDIA_MOUNTED (and I don't want to add that flag to it). How can I receive it even in stopped application? It seems to me that for sure it's possible because for example com.android.shell application is able to

Why doesn't my Lollipop ActionBar show any color (essentially colorPrimary)?

↘锁芯ラ 提交于 2019-12-25 13:10:33
问题 I wrote this SSCCE to demonstrate the problem. The emulator is NexusFive but it is customised to use API22. SSCCE res/values/colors.xml <?xml version="1.0" encoding="utf-8"?> <resources> <color name="primaryColor">#69F0AE</color> <!-- Light ferozi --> <color name="primaryColorDark">#00E676</color> <!-- Darker Ferozi --> <color name="accentColor">#F44336</color> <!-- Red 500 --> </resources> res/values/styles.xml <resources> <style name="AppBaseTheme" parent="Theme.AppCompat"></style> <style