android-8.0-oreo

Launcher Icon is not Shown in Oreo 8.0/8.1

回眸只為那壹抹淺笑 提交于 2019-11-28 19:08:40
Explanation: I have a working app in google play market. Everything works fine in android versions from 4.0-7.0. Case: When the client downloaded it on his Android 8.0 (Oreo) a launcher icon did not seem to show instead android's default launcher icon is showing!! Question: Anyone who has encountered such issue? I need any hints to solve it since it seems weird because I have all 4 typed .png icons in mipmap folder. Yes, I also faced the same issue in Android Oreo. 1) Add your images by adding in Image Vector This might not be the ideal solution. But deleting the directory named mipmap-anydpi

Autosizing of TextView doesn't work (Android O)

喜你入骨 提交于 2019-11-28 18:35:22
I use new autosize feature added in support library 26. I read a documentation which can be found here : https://developer.android.com/preview/features/autosizing-textview.html I suppose that it should work this way: You can enable auto-sizing with this attribute: app:autoSizeTextType="uniform" . I think that TextView should use all available space to display a whole text (not just a part - it shouldn't be cropped) and the textSize should be as big as possible. If you need to limit a maximum or minimum size of the text then you can use these two attributes: app:autoSizeMinTextSize="XXsp" //

In Oreo (8.0.0+) (API 26+), How to get a location services update when the app is in the background or kill

南楼画角 提交于 2019-11-28 16:35:10
In Android O (8.0.0+) (API 26+), How to get a location services update when the app is in the background or kill. In "Strava" Android App (Available on Play Store ), location services run properly when the app is in the background or kill. I need to build same functionality in my app. Whenever I start service using startService(new Intent(this, GpsServices.class)); Then the onDestroy method is called after 10 sec when an app is an idle mode (the app is in the background or kill). Below is my code. public class GpsServices extends Service implements LocationListener, Listener { @Override public

Android 8.0 Oreo crash on focusing TextInputEditText

青春壹個敷衍的年華 提交于 2019-11-28 15:46:04
After updating some of our devices to android 8.0 , upon focusing on a TextInputEditText field inside of a TextInputLayout , the app crashes with this Exception : Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.getBoundsOnScreen(android.graphics.Rect)' on a null object reference at android.app.assist.AssistStructure$WindowNode.(AssistStructure.java) at android.app.assist.AssistStructure.(AssistStructure.java) at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:3035) at android.app.ActivityThread$H

Can I still have a data logging background service in Android 8.0?

ぐ巨炮叔叔 提交于 2019-11-28 14:31:13
My app relies on logging the battery temperature, as well as several other sensor variables, every second in a background service that can be started from the main activity and continues running in the background until it's stopped (by another button in the main activity). This works fine in Android 7.0 and below, but reading into Android 8.0, it looks like it limits background services pretty severely. Can I still do this data logging that I currently do, or is that no longer possible? If your usecase is to keep the app in foreground during this processing then, based on the documentation ,

I am not able to receive “android.provider.Telephony.SMS_RECEIVED” this broadcast in Android Oreo

梦想与她 提交于 2019-11-28 12:29:39
This is my Menifest file <receiver android:name="com.agribazaar.android.receivers.OTPReceiver" android:exported="true"> <intent-filter> <action android:name="android.provider.Telephony.SMS_RECEIVED" /> </intent-filter> </receiver> This is my Broadcast Receiver class public class OTPReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if(intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED")){ } } This fixed the issue for me - I wasn't explicitly requesting permission at runtime for android.Manifest.permission.RECEIVE_SMS. In

progmatically send sms on android 8

霸气de小男生 提交于 2019-11-28 11:47:12
问题 I want the SMS screen to be dismissed AND control to come to my app automatically after sending the SMS. i'm using this code to send sms: Uri uri = Uri.parse("smsto:" + "074********; 074********"); Intent smsSIntent = new Intent(Intent.ACTION_SENDTO, uri); smsSIntent.putExtra("sms_body", "iconference sms"); sendIntent.putExtra("exit_on_sent", true); startActivity(smsSIntent); this code works fine in all versions of android but in android 8 when i click send my application goes on background

How to register for ACTION_PACKAGE_ADDED and ACTION_PACKAGE_REMOVED on Android Oreo?

前提是你 提交于 2019-11-28 11:34:16
Looking at the latest Android Oreo release notes, it seems like only a handful of implicit broadcasts can be registered by the apps. ACTION_PACKAGE_ADDED and ACTION_PACKAGE_REMOVED is not among them. Is there a workaround for receiving these broadcasts? From the docs : Apps that target Android 8.0 or higher can no longer register broadcast receivers for implicit broadcasts in their manifest. An implicit broadcast is a broadcast that does not target that app specifically. For example, ACTION_PACKAGE_REPLACED is an implicit broadcast, since it is sent to all registered listeners, letting them

Get Device mac adress in Android Nougat and O programmatically

强颜欢笑 提交于 2019-11-28 10:10:35
问题 I have an application, which required device mac address. I'm getting mac address in Marshmallow and below easily but problem with android nougat and O. So how to find mac. 回答1: Changed since 6.0 and later: https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id To provide users with greater data protection, starting in this release, Android removes programmatic access to the device’s local hardware identifier for apps using the Wi-Fi and

ProgressDialog is deprecated [duplicate]

为君一笑 提交于 2019-11-28 10:00:54
This question already has an answer here: ProgressDialog is deprecated.What is the alternate one to use? 16 answers Since the ProgressDialog is deprecated from the Android version O, I'm still finding a better way out to do my task. The task is to move from my activity to the fragment. Everything is working fine but the progressdialog is not visible. I've tried implementing it but... the progressdialog doesn't work. It seems the progressbar would work but still not working. I need a progressdialog because it is simply easy for me to set my title and the message. I need a spinner progressDialog