• Breaking News

    [Android][timeline][#f39c12]

    Tuesday, October 30, 2018

    Android Studio 3.3 Beta 2 is available Android Dev

    Android Studio 3.3 Beta 2 is available Android Dev


    Android Studio 3.3 Beta 2 is available

    Posted: 30 Oct 2018 10:06 AM PDT

    Vote to support incremental annotation processing in kapt!

    Posted: 30 Oct 2018 05:40 AM PDT

    This is important to all Android devs using Kotlin. I found the issue in JetBrains but was suprised by how few votes it had (124 when I checked).

    Come on guys, add some votes!!

    YouTrack issue - once you have an account, click the thumbs icon on the same row as the Title.

    submitted by /u/bart007345
    [link] [comments]

    Books to read before reading Android Programming: The Big Nerd Ranch Guide?

    Posted: 30 Oct 2018 10:01 AM PDT

    I wanted to read this book but it says in the introduction that i should read another book on java to be able to understand the whole concepts explained in the book.

    what is your suggestion?

    most of the java books are either boring or too long. introduce me a good one?

    you can suggest a good course as well.

    I have no background in java and want to learn it.

    submitted by /u/gooddev25
    [link] [comments]

    Always using PrecomputedText?

    Posted: 30 Oct 2018 10:31 AM PDT

    We recently started using PrecomputedText on some TextViews that get updated regularly. Now we thought if we should PrecomputedText everytime we set some text on a TextView. It might not always bring a performance benefit, but it certainly won't decrease performance, right? Is there something we are missing or can/should we go for it? Maybe switching threads every time is more expensive, but that overhead can be decreased if we use Coroutines...

    submitted by /u/eckenman
    [link] [comments]

    Back Button always to home page. hijacking or perfectly ok?

    Posted: 30 Oct 2018 08:51 AM PDT

    I've noticed some apps (and facebook even does it in the browser) when I click the back button after opening the app and only viewing 1 screen, instead of default behavior of closing app or going to previous page in browser. The app takes you to the home screen. Seems like a great idea from a developer perspective as it keeps users on the app or website. Is this an accepted practice? Why don't all apps do this?

    submitted by /u/donthe1
    [link] [comments]

    If you were an end-user, how would feel about the following consent dialog?

    Posted: 30 Oct 2018 03:17 PM PDT

    If you were an end-user, how would feel about the following consent dialog?

    I am wondering what your thoughts are, whether you feel the on-boarding process is too long, if you would feel comfortable sharing data, etc. Thanks.

    https://i.redd.it/g148369wdev11.png

    submitted by /u/JamieCorkhill
    [link] [comments]

    How on earth can we do any long-running operations reliably (and other device-specific quirks)

    Posted: 29 Oct 2018 11:20 PM PDT

    For the last few months, I've been upgrading an app that was targeting sdk 25 to 27/28. The changes that were introduced in 26 have been the most challenging to deal with - namely, the background execution limits.

    The documentation says that an application is considered to be in foreground if any of these is true:

    • It has a visible activity

    • It has a foreground service

    • Another app with a foreground status is using the app, eg. by binding to its services

    Fair enough, I can live with that, just make all the services foreground services that do long-running operations. However, the actual behavior of the app depends on the device in question. For instance, Oneplus 5T and Oneplus 6 seem to consider an app to be in foreground only if it has a visible activity. Foreground services are halted after a few minutes when the screen is off, an resumed immediately when turning the screen back on. Similarly, Nokia 8 either halts or just quietly destroys foreground services after a while.

    To make things even more complicated, some models do keep the services alive, but alter the peripherals. For instance, some Samsung phones seem to break Bluetooth connections if the screen is off. On some Huawei devices, everything goes bonkers: Bluetooth works perfectly when screen is off, but the transfer speeds slow down to a crawl when the screen is on. Apparently turning off wi-fi helps it, so I guess it's just a crappy chipset they're using. I'd just prefer things to work while the screen is on as well.

    On a bit of a side-note, there are some devices that make debugging a nightmare as they don't produce the full logcat output. For instance, Galaxy S5 only shows about 10% of the log whereas S6 shows the full output. Similar issues are found across the board with multiple devices and manufacturers.

    Regarding all the battery-saving features, I've tried to test each and every one I've found on the test devices, with various outcomes:

    • Oneplus 6: disallowing background execution leads to foreground services being treated as background services (as one would assume) and execution fails. Allowing background execution allows foreground services, but they are killed after a while.

    • The "default" battery optimization seems to do quite a bit on most of the devices. By default, the apps seem to be optimized. Disabling the optimization lets many of the devices run the foreground services at least for the duration we've tested (excluding Nokia 8 and Oneplus devices)

    • On Samsung S6, there is Samsung's own power saving feature, which had to be disabled for the app to allow Bluetooth connections to be maintained while the screen was off

    • On Huawei Mate 10 Pro, there were at least three independent power saving features that had to be disabled in order to let foreground services run properly

    • On Nokia 8, no amount of disabling power saving features lets the foreground service to live long enough

    Now, I'm fairly certain that I've done all the things we're supposed to do to keep the app alive, but just in case I haven't, here are the steps I've taken:

    • When a foreground service is created, the launching activity calls ContextCompat.startForegroundService() to start the service

    • In the service's onCreate() method, startForeground() is invoked with a notification

    • In the service's onCreate() method, partial wake lock is acquired

    • Foreground service permission (targeting sdk 28) is set in the manifest

    The weird thing is, all the problematic phones I've encountered so far have no trouble running eg. Spotify in the background, or any other music players or podcast apps (eg. Podcast Addict works just fine with Oneplus 6 and a Bluetooth speaker for multiple hours). What is it that I'm doing wrong with the foreground services?

    submitted by /u/-manabreak
    [link] [comments]

    RecyclerView Loading With Facebook Shimmer Effect Android Example

    Posted: 30 Oct 2018 06:55 AM PDT

    Nearby Connections API - can't get it to work in a 2-1 connection

    Posted: 30 Oct 2018 12:17 PM PDT

    Currently my team is working on developing a teacher attendance app. We are trying to use Nearby Connections to have a teacher device advertise such that multiple student devices can discover and connect to it around the same time. Right now, we are testing on three Kindle Fire 7 devices- two are "students" and one is the "teacher."

    We've found that when one specific device acts as the teacher, we are able to get both of the student devices to discover and connect to it without any problem. However, when we shift the teacher to one of the other two devices, and have the remaining devices as students, we face an error. Essentially, the first student is able to discover and connect to the teacher, but after the second student discovers the teacher endpoint successfully, it fails to request a connection with it, throwing error: STATUS_BLUETOOTH_ERROR.

    This occurs when we run the teacher app on either of the two devices, and we have no idea why, as it seems every device has the same configuration settings, and they are all Kindle Fire 7. Does anyone who has experience with Nearby Connections know what might be going on?

    submitted by /u/TheAbLord
    [link] [comments]

    Volatile question (thread safety)

    Posted: 30 Oct 2018 12:55 PM PDT

    Hi all,

    I was reading the source code for IntentService (link: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/IntentService.java)

    What interesting about this code is: Looper mServiceLooper and ServiceHandler mServiceHandler is defined as volatile.

    Now my question is why they should be defined as volatile? Both of these objects are only accessed from the MainThread and there is no concurrent access of these object.

    submitted by /u/hulkdx
    [link] [comments]

    Detect faces in real time on Android using Google’s ML Kit

    Posted: 30 Oct 2018 09:46 AM PDT

    Anyone working with geofences here?

    Posted: 30 Oct 2018 03:13 AM PDT

    How do you run them reliably? In the latest phones(with oreo and pie) it seems very difficult to get them running in a reliable way. Os puts the app in an inactive state quite aggressively. The app no longer receives the geofence events and other broadcasts, if the user removes the app from the recent tasks. Even the sync jobs dont run in that scenario. It seems like if the battery optimisation is off for the app, then everything works fine. How does anyone handle these scenarios?

    submitted by /u/vicky3107
    [link] [comments]

    Recommended way to do an ImageView with swipe (like passing slides)?

    Posted: 30 Oct 2018 03:54 PM PDT

    In my research, keep in mind I just started learning android, it seems that using Glide, PhotoView and ViewPager, are the best way. PhotoView will give pan/zoom, Glide will make things efficient, and ViewPager for swiping (changing images like a slideshow). Is this okay? What would you guys recommend?

    Sources:

    https://blog.iamsuleiman.com/android-image-gallery-app-gestures-transition/

    https://github.com/bumptech/glide

    https://github.com/chrisbanes/PhotoView

    submitted by /u/MERAXNA
    [link] [comments]

    Anyone know anything about ACTION_CREDIT_CARD_OCR' ?

    Posted: 30 Oct 2018 11:19 AM PDT

    I was looking into how Google Pay doesn't require the camera permission for their OCR credit card feature and discovered that it is using this feature in Play Services. Turns out there is an intent action to invoke it from Play Services (com.google.android.gms.ocr.ACTION_CREDIT_CARD_OCR)...

    However when I try to use it my app is rejected saying it isn't white listed (based on the APK signing). So apparently only Google's apps like Google Pay are able to use features like this out of Play Services on the platform but our apps cannot?

    submitted by /u/CrazyAndroidMonster
    [link] [comments]

    Setting up deeplinks the right way

    Posted: 30 Oct 2018 02:52 PM PDT

    Can anyone shed some light on `Android App Links`, `App Indexing`, and `Deeplinks`. What are the differences and when should we use each one of them? Should we set up all three? What do we use in the `Navigation` Architecture Components navigation actions?

    submitted by /u/lawloretienne
    [link] [comments]

    Is it OK to encourage user to leave 5 stars review via Google Play Store description.

    Posted: 30 Oct 2018 08:03 AM PDT

    According to https://play.google.com/about/storelisting-promotional/ratings-reviews-installs/, it is clearly states

    "Asking users to rate your app while offering an incentive:" is not allowed.

    I was wondering, in such case, is it OK to have the following description in Google Play store?

    "If you are happy with the app, do show your encouragement for us by reviewing the app with 5 stars."

    submitted by /u/yccheok
    [link] [comments]

    What’s new with firebase this year?

    Posted: 30 Oct 2018 01:40 AM PDT

    i need help with Android wear app

    Posted: 30 Oct 2018 01:02 PM PDT

    I'm new to android wear apps , i would like to know how to send a string from the watch to the phone using googleApiClient i know it's not possible to send them directly without googleapi.

    submitted by /u/skmercur
    [link] [comments]

    How can we store and restore scroll view which is generated by LinearLayout

    Posted: 30 Oct 2018 07:27 AM PDT

    I am developing a small android app in which I want to load the position of scroll view once I get back to the activity.

    submitted by /u/durgesh2018
    [link] [comments]

    Android Studio requesting for microphone access

    Posted: 30 Oct 2018 11:09 AM PDT

    Does anyone received a request for microphone access on Android Studio already?

    https://twitter.com/filipedlb/status/1056969512845803522

    submitted by /u/filipedelimabrito
    [link] [comments]

    Google Play screenshot size

    Posted: 30 Oct 2018 07:09 AM PDT

    Hello guys,

    I am currently working with a website and my client wants me to make them a app screenshots for preview.

    We chose 2560 x 1440 resolution. Is that all right for all devices or do we need at least few resolutions?

    Thank you!

    submitted by /u/lithuanianturtle
    [link] [comments]

    A clear article on Android + Gradle.

    Posted: 30 Oct 2018 10:51 AM PDT

    How FCM messages are handled in the Android OS?

    Posted: 30 Oct 2018 02:26 AM PDT

    I know that if you have to send an FCM message you have to send it the device corresponding to the FirebaseInstance.getInstanceId() value and in on onMessageReceived you handle it as you wish to - show a notification or start and Activity but what I want to know is how the Android OS comes to know that a new message has arrived (including Android Oreo - with all those background service execution limits and all).

    submitted by /u/bijoyjoseph
    [link] [comments]

    Is the "View Bitmap" function gone in Android Studio 3.x?

    Posted: 29 Oct 2018 06:18 PM PDT

    As I remember in Android Studio 2.x, there's a nice feature "View Bitmap" when you press right click on Bitmap object in heap dump, but I cannot find it anymore in latest Android Studio. Is it gone?

    submitted by /u/am5a03
    [link] [comments]

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel