• Breaking News

    Friday, November 15, 2019

    Android Dev - Weekly "anything goes" thread!

    Android Dev - Weekly "anything goes" thread!


    Weekly "anything goes" thread!

    Posted: 15 Nov 2019 04:40 AM PST

    Here's your chance to talk about whatever!

    Although if you're thinking about getting feedback on an app, you should wait until tomorrow's App Feedback thread.

    Remember that while you can talk about any topic, being a jerk is still not allowed.

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

    Distributing .aab App Bundles to testers

    Posted: 15 Nov 2019 05:00 AM PST

    Our team has recently migrated from building .apk files to using app bundle for production distribution. Recently we added a new feature, which is implemented as an on-demand module.

    Currently, our testing workflow uses CI to upload builds from our PR's to Crashlytics Beta for testing, so that they can be QA'd before merging. However, this does not work for our new feature, since the Crashlytics Beta does not support app bundles, so it can't deliver the new additional .apk file. I'm not sure how best to test our app in this case.

    I've considered these options:

    • Firebase app distribution
      • does not support app bundles
    • Google Play internal test track
      • testers can only see one version at a time (we have many PR's open for QA at a time)
      • requires versionCode to be incremented every time
    • Google Play internal app sharing
      • requires for the app to be published on Google Play - not ideal for us since our internal version has a different package name. Changing this would complicate our QA setup in other ways.

    How is everyone else managing internal testing with app bundles?

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

    How are you managing conversions/mappings between DTO classes and entity classes?

    Posted: 15 Nov 2019 12:15 AM PST

    Dear Friends,

    normally I use room as local database and retrofit for downloading data from the backend. In some cases, I used the same class or data class to play the role of DTO for Retrofit and entity class for Room.

    Although this approach works, it has disadvantages. For example, in my current project, only 40% of the fields received in the DTO have to be persisted in the room database. Of course, I can ignore the fields for room with the room annotations. But if we have classes with many fields, then the code of the class starts to be messy (Jackson annotations mixed with room annotations and so on).

    For my next project, I would like to try the approach of having the entities separated from the DTO. This makes sense not only because not all fields have to be persisted, but also because some properties of a DTO class, may generate entities that are stored in separate tables, and although I could write converters for room to store these entities as JSON or something, that is again tricky.

    But the disadvantage of separating the DTO's classes from the database entity classes is the whole mapping process. And that is the question that I would like to make you: how do you manage those conversions? While developing backends with c# we use a library called Automapper for that, but I don't find a similar library for kotlin or java.

    Thank you in advance!

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

    You can define an extension to a companion object

    Posted: 14 Nov 2019 08:59 AM PST

    Daggers code generation creating a newInstance

    Posted: 15 Nov 2019 05:57 AM PST

    Daggers code generation creating a newInstance

    I was checking files and code that Dagger generates at compile time, and I saw a newInstance generation which returned the Instance of a class that Dagger knows how to resolve.That method is not used anywhere. My question is why is there a newInstance method, or better say what could be the case for generating it? Or better say: Why would I want to use HomeRepository_Factory.newInstance(parameter1, parameter2)?

    For more info, I'm attaching image

    https://preview.redd.it/oxlza1ktvuy31.png?width=990&format=png&auto=webp&s=bb550159be753682157dec7dc9f30f8b1fc72807

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

    Questions about new FragmentFactory.

    Posted: 15 Nov 2019 03:36 AM PST

    I've read a few articles on FragmentFactory but I still have holes in my knowledge.

    I understand it now gives us the freedom to use constructor injection, does this mean it's a replacement for Bundle arguments?

    Or is it for wider-scoped dependencies that Dagger would have previously provided, and we should still use Bundles?

    Also, how does it fit in with Navigation? Or does it?

    Is it a case that there's no recommended pattern and it's up to devs to figure it out for their own use case?

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

    Mmmmmm... more memory!

    Posted: 14 Nov 2019 08:20 PM PST

    Question: any good alternative to the old, deprecated tool of "UI Automator Viewer" ?

    Posted: 15 Nov 2019 01:20 AM PST

    This:

    https://www.youtube.com/watch?v=XBhfYAYKZF4

    Sadly it got deprecated and for some reason I fail to open it anymore (including all DDMS tools, like the "Hierarchy Viewer"). It doesn't even exist on Android Studio as it used to.

    Is there any good alternative to it?

    Now, before you tell me "layout inspector" , remember that the old tool was able to investigate all apps, and not just debuggable ones.

    This allowed you to investigate and learn from other apps, of how the developers of those apps decided to lay the views.

    It also allowed you to investigate your own apps when you have them on release mode.

    And, of course, it was a useful tiny tool for QA, to make automation code (finding the ids of views was useful, for example) without really having the full-blown IDE. It was very quick and light.

    submitted by /u/AD-LB
    [link] [comments]

    I need some help. Have been stuck for 2 days trying to figure out but no luck.

    Posted: 15 Nov 2019 07:50 AM PST

    Button only works once for AnimationDrawable on ImageView?

    Posted: 15 Nov 2019 07:45 AM PST

    Hello,

    I created an AnimationDrawable on top of an ImageView, and it executes at the click of a button.

    That works fine only once. If I click the button again, the animation does not run.

    Is there a way I can make that happen?

    Also, I have a default animation created on onStart() that I would like to disappear after a button is pressed, then reappear after the button press animation is over.

    The two tasks are:
    1) Click button -> Default animation disappears -> New Animation starts - > New Animation stops -> Animation disappears-> Default animation reappears again

    Make it happen again however many times, depending on if you click the button or not.

    2) Make the default animation disappear as soon as that button is clicked, and make it reappear once the new animation has stopped.

    What are the relevant methods for determining the finish of an animation, and the registration of a button click?
    How would I make the AnimationDrawable (the default animation) appear again?

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

    Possible to access Huawei phone with dead screen with no USB debugging activated?

    Posted: 15 Nov 2019 04:22 AM PST

    Looking to grab some data off my Nova 3i, unfortunately don't have USB debugging on so can't have my PC access it. Is there a way to turn it on with a dead screen or get around it? Thanks.

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

    Any idea how to make this? My client gave me a project which uses recyclerview and viewpager inside appbarlayout. Is that any other way?

    Posted: 14 Nov 2019 12:27 PM PST

    How much are the admob rates for rewarded video CPM in India?

    Posted: 15 Nov 2019 03:05 AM PST

    Is there a way to make ImageView jump around on screen?

    Posted: 15 Nov 2019 02:04 AM PST

    I know I can use setX() and setY(), but how can I make imageView jump around the screen continuously by bounded X and Y coordinates?

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

    Android Studio 3.6 Beta 4 available

    Posted: 14 Nov 2019 10:16 AM PST

    Does a "Bad Behavior" flag lead a bad result to a developer account?

    Posted: 14 Nov 2019 10:07 PM PST

    Does a "Bad Behavior" flag lead a bad result to a developer account?

    Hi everyone,

    I lately got a red flag of "Excessive wakeups" (screenshot attached) of my app in Google Play Console.
    Unfortunately, I don't have any idea (yet) how to resolve this issue.
    It seems that I need more time to figure out where is the problem of my app.

    My question is, does this red flag lead to any consequence to my app or my account or something else?
    Do I have plenty time (at least, 3 months, I believe) to identify, to analyse, and to solve this problem?

    Thanks for the answer! Anything would help!

    https://preview.redd.it/1t64qsbfisy31.png?width=382&format=png&auto=webp&s=1c472878cf3b9aa1fc0a8bb89e4af61514572449

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

    Android Studio 4.0 Canary 3 available

    Posted: 14 Nov 2019 10:16 AM PST

    Did u find ASO tool useful to help you increase app downloads?

    Posted: 14 Nov 2019 10:19 PM PST

    Currently, I'm investing x amount of money in Google Ads. The paid downloads increased, but that doesn't help in term of organic download.

    I was thinking to invest in an ASO tool. I was wondering, does most of ASO tool in the market useful in helping you increase organic download?

    1) What information they are providing, which market Android console doesn't?

    2) How can I utilize those information to help me gain more organic download? Besides tweaking app description to have correct keyword, what else I can do based on information provided by ASO?

    Which ASO tool would you recommend?

    Thank you.

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

    [AOSP] Which branch is the real android 10 release branch/tag in AOSP ?

    Posted: 14 Nov 2019 06:29 PM PST

    Hi,

    I'm new to AOSP repo, and I want to find the android repo release routine

    After reading the branch list ,I found below branch naming with android10-*

    And Android 10 is said released on Sep 5, found Tags with android10*/q*

    So I puzzled with these similar names, and I have some guess

    1. android-q-preview-* and android-10.0.0* are the release tags that related to Beta version and android10-release is the real release branch (the time seems match with news) ?
    2. android10-dev is the develop branch and may sync with master and android10-release
    3. android-10.0.0_r1 ones are from release branches, but do not know the different with android-mainline-10.0.0_r1 like tags ?
    4. if I want to follow the android beta version to real release nodes to see how it gose , which tags/branch should I follow ?
    5. since many merge in the commmit message , if I want to track the real commits between releases using script, could I use commit id for trace (commit id may stay unchanged in different branches merge?)

    Any AOSP experts could solve my questions? Thanks!

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

    Alternatives to using @Parcelize for kotlin only module

    Posted: 14 Nov 2019 07:51 PM PST

    I have a multi module project, and one of my modules has all my domain models in it. One of these models I want to pass between two fragments (in a fragment only app) as a part of the bundle. Since this domain data class is in a kotlin only module I cannot access the Parcelable interface / annotation. I am wondering what alternatives there are.

    So far I have seen - some wrapper class in an android module - serialize to json and send in the bundle that way

    Both seem non-desireable, but I am not sure what else to do

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

    What are the topics an adroid developer with 1 year of experience should know?

    Posted: 14 Nov 2019 12:21 PM PST

    Few years ago I worked as an android dev for a company in my home country for a year . Back in the day the main requirement for applying was the big motivation for android. After a year the company was shut down and I moved to different country for studies in an unrelated field. Finished the studies and currently waiting for work permit. But it has been a long since I worked as android developer and don't much about requirements for a developer with a year of experience.

    I recently build a simple Note app in Java using MVVM architecture , LiveData and Room using some design concepts like swipe to delete for recycler view and animated background etc. Also know a bit of Git and used Firebase for another app before but with crappy architecture.

    So my question is would that be enough for someone with 1 year of experience when applying for a job? Or should i dive into RxJava, Dagger, Retrofit etc considering that i'm not going for senior dev position

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

    Admob ad serving has been limited! Does anyone know how long this takes? Please share your experience if any. I had sudden increase in traffic as i released it on my instagram page. It jumped from 0 to around 100 users in a day. No bots.

    Posted: 14 Nov 2019 11:38 AM PST

    No comments:

    Post a Comment