• Breaking News

    Friday, July 24, 2020

    Android Dev - Weekly "anything goes" thread!

    Android Dev - Weekly "anything goes" thread!


    Weekly "anything goes" thread!

    Posted: 24 Jul 2020 05:40 AM PDT

    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]

    Introducing Jetpack on GitHub

    Posted: 24 Jul 2020 06:15 AM PDT

    AndroidX Jetpack, now on GitHub

    Posted: 24 Jul 2020 06:33 AM PDT

    ‪AndroidX Jetpack is now on GitHub. We also enabled the ability to contribute from GitHub for a subset of projects. Starting today, you can contribute to Room and WorkManager from GitHub. ‬

    ‪If you want this workflow for more projects, let us know !‬

    https://github.com/androidx/androidx/blob/androidx-master-dev/CONTRIBUTING.md

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

    Case Study: Boosting organic growth with localized meta descriptions

    Posted: 24 Jul 2020 11:03 AM PDT

    Case Study: Boosting organic growth with localized meta descriptions

    8 months ago, we launched a generic app. It was only localized in English, because English speaking markets were our target (and because US is usually the leading app market)

    We then asked ourselves: What will happen to organic user acquisition if we localize the meta descriptions to the languages of these countries?

    So we did just that. We translated the AppStore meta descriptions into 15 languages.

    Let's break down what happened to organic user acquisition in individual countries.

    Let's start with the success story, Italy:

    Adding the meta descriptions took us from a few downloads to a lot! (at our scale). Italy is now our biggest market!

    Then Spain:

    We are not at rock star level yet in Spain but meta localisation got us off the ground! We went from zero to 25 downloads per week (at peak)

    France:

    I'm starting to see a pattern here

    South Korea:

    https://preview.redd.it/axcusuqeguc51.png?width=582&format=png&auto=webp&s=30aed14e5e194bf70fe701c46d6e30dc368e7058

    The huge spike in South Korea was caused by being ranked #1 in our category for a few days. As our ranking went back down, new acquisitions levelled off. But still better than before the meta descriptions!

    Japan:

    Ok, Ok, you get the picture by now

    You might be thinking, that makes sense, they don't really speak good English in these countries. So what about a country where they speak good English? Like Germany for example:

    https://preview.redd.it/j5a838ynguc51.png?width=581&format=png&auto=webp&s=78dfebac32d5c2d93b714c2c275d62b9ddaf859f

    Now it's true that the translations alone don't guarantee better user acquisition. The choice of keywords is important. But it is certain that localizing the meta descriptions is a factor that helps rank higher in the AppStore and Google Play Store. Has anyone here seen similar results with localizations?

    BTW, if you are wondering, we use bambooata.io analytics for our in app and ASO analytics.

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

    Using LiveData to monitor network

    Posted: 24 Jul 2020 03:32 AM PDT

    A small gist with an "explanation" on how to use LiveData to monitor network connection

    Link -> https://medium.com/@brhargett/yanm-yet-another-network-monitor-86a57495e011

    Critiques are welcomed

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

    Is developing inside a Linux VM running on Windows viable?

    Posted: 24 Jul 2020 06:45 AM PDT

    Hey, want to sell my MacBook Pro (what a fucking joke this machine has become. Fuck the touch bar) and get a Windows laptop, then run Ubuntu in VirtualBox (or similar) and develop for Android (React Native, but some Android Studio) in there.

    I don't really like the idea of developing in Windows because I love having Bash and all the Linux/Unix tools and documentation available to me, and that's kind of how my workflow is setup. As well as the customization of the desktop, window manager etc.

    Just wondering if anybody does this and if it works well? Is there anything I should watch out for when picking a laptop?

    Booting Linux is not really an option for me for various reasons: it's a laptop, plus I'd like to be able to run games without having to reboot into a different OS and reopen all my dev tools.

    Thanks!

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

    Dynamic Feature Module Resource Access buggy?

    Posted: 24 Jul 2020 08:28 AM PDT

    I am trying to implement dynamic feature modules into my project and when it comes to the point where I want to access resources of my dynamic feature modules everything is a bit buggy and none of the related questions helps me.

    First of all, I have no activities or fragments in my dynamic feature modules. Only my base core module has 2 activities and a couple of fragments.

    The first strange thing is that everyone says that if you have activities in your dynamic feature modules you have to call SplitCompat.install(this) in the onAttachBaseContext() method of the corresponding activity right? But the strange thing is that I tried to call it in the activity of my base module because the app instantly crashed after I have downloaded the dynamic feature modules and tried to access their resources, and the crash was gone. No one is telling that you have to call it in the activities of the base module. My application class extends from SplitCompatApplication so I thought that was all that I have to do but it wasn't.

    And the second strange thing is that everything is working except of one string array I am trying to access from one of my dynamic feature modules. The app instantly crashed and I don't know why because all the other resources are found without throwing an exception. Another strange thing, when I newly install the app from the play store, it is working without crashing. But as soon as I completely close the app, the resource not found exception occurs again. Can anybody tell me how to handle resource access in Dynamic feature modules the right way?

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

    How Discord Made Android In-App Navigation Easier

    Posted: 24 Jul 2020 12:05 PM PDT

    Android Jetpack is back in GitHub as a mirror to AOSP.

    Posted: 23 Jul 2020 08:57 PM PDT

    Hire a Mobile Dev safely

    Posted: 24 Jul 2020 11:26 AM PDT

    Hi!

    I would like to know the Best platform or process yo hire a Mobile Dev to create an Android app

    Thanks!

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

    Can android application be aware if android device is dropped or used to knock on door?

    Posted: 24 Jul 2020 10:51 AM PDT

    I know there are some applications that can measure hart beats or walking... etc...
    but not sure if device can detect knocking?
    I found this useful in case you want to count for example large amount of boxes, so after each knock on the box application increment counter.

    Is it possible?
    What API should I start looking?

    submitted by /u/zninja-bg
    [link] [comments]

    Improving inter-activity communication with Jetpack ActivityResult

    Posted: 23 Jul 2020 02:03 PM PDT

    Build Aosp Launcher from source in android studio

    Posted: 24 Jul 2020 07:37 AM PDT

    Is there any way to build Aosp Launcher in android studio

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

    RecyclerView

    Posted: 24 Jul 2020 06:09 AM PDT

    This might probably not be the most interesting post, but I have been working on my first android application and its almost done except the RecyclerView. I have tried to follow multiple tutorials -CodingWithMitch, stack overflow answers, developer docs, and even GitHub APIs, but somehow I am always running into an error. My need for a RecyclerView is very simple. A simple card view and text. That's it. Could anyone be nice enough to point me in the direction to a correct working link or perhaps give some insight into any alternatives on GitHub or something like that?

    Thanks.

    Best, A budding android developer.

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

    Android Studio 4.1 Beta 5 available

    Posted: 23 Jul 2020 01:04 PM PDT

    Developing a personalized search in an app

    Posted: 24 Jul 2020 02:19 AM PDT

    Hey guys, I'm not sure if this is the correct subreddit for this question but I thought some you could offer me advice.

    I'm developing a Firebase app with a browse option. I wanted to provide a way for the search to display personalized results to the user, based on the things they previously clicked on, or searched, as well as some basic user info (age and such).

    Is there a widely accepted way of doing this? I know about the existence of Firebase ML although I'm not sure whether it's the most appropriate approach.

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

    Use WorkManager for immediate background execution

    Posted: 23 Jul 2020 10:59 AM PDT

    Build Apps from Source Code

    Posted: 24 Jul 2020 01:32 AM PDT

    Do you know any way to build android apps directly in the phone right after downloading the archive from source code sites?

    I don't intend to open the PC and do a mess with IDE's every time I want to install an app, and I think it would be kinda weird if really we can't do such thing, by running some terminal command on Android and point the source code package (POSIX distros can do that).

    If you guys help me figure this out, you will make me super happy.

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

    Decrease startup time with Jetpack App Startup

    Posted: 23 Jul 2020 12:25 PM PDT

    How to update UI during multithreading in Android? Handler old?

    Posted: 24 Jul 2020 12:05 AM PDT

    I'm totally confused about multithreading in Android. Let's say, we have default Threading, Service, Broadcast, WorkManager, Handler, etc. These things allow you to separate your work from the main thread (UI thread). Sounds fine...but what about if you want to update the UI state in your app during separate work? You can't do this, but Handler can. IMO, Handler is old stuff nowadays and you should use another cool stuff from JetPack. Thus, my first question is Is Handler old for using it nowadays?
    My second question is How to update UI state during separate work?
    Note that, AsyncTask is deprecated. I thought you can use ViewModel and LiveData to update your UI. Is it good in this case?
    Hope you can help me figure it out)

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

    When as expression

    Posted: 23 Jul 2020 11:40 PM PDT

    Android WebView: Display only half of a webpage

    Posted: 23 Jul 2020 10:54 PM PDT

    Currently I have a HTML page with a container containing element A on the left side and element B on the right side. I'm trying to view this page using ViewPager with two tabs ie. have only half of the webpage displayed on Tab1 and the other half on Tab2. This makes it so that even if the user chooses to scroll all the way on Tab1, he can never see the content on the right side unless he swipes to Tab2. The size can be determined by 0-50% and 51% - 100% horizontally if possible.

    Any idea how this can be implemented?

    Please tell me if i'm on the wrong subreddit as well thanks!

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

    Google Play Update Distribution

    Posted: 23 Jul 2020 04:16 PM PDT

    Few months ago i have published an update for an app we are developing. It was an early public release, client was in a hurry for a public release even tho we were advising them to wait for a few weeks until we finish stabilization.

    Earlier that month i did refactoring of application update and switched from our custom implementation of forced update to googles in-app update implementation without option for flexible updates and supported immediate updates only. We tested it in beta phase and it worked as expected.

    So when i uploaded this app update, lets say v 1.0.0. and few hours later we published new update ( i know, not a good practice, we dont get to choose tho ), lets say v 1.0.1.
    Release v1.0.0. started reaching users few hours into the release but we expected for v1.0.1. to override that but it didnt. as well as three days into the release of v1.0.1. we could see on our server that people are still hitting our old version of v1.0.0., even tho we are checking for and update and forcing them to update on application startup. We are aware that some users dont have automatic updates enabled, or updates over cellular data but anyway we want to disable them logging in util they update cuz it is crucial for all users to have same features or crashes will occur.

    I am wondering if anyone can explain to me how does Google Play distributes updates and if anyone can explain to me why did the users with old version were still able to log in, without forced update?

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

    Is copying over AutoClearedValue the best/consensus approach to prevent leaking view References? If so, shouldn't it be moved into the lifecycle packages as part of Jetpack?

    Posted: 23 Jul 2020 10:57 AM PDT

    BackgroundI've recently found that I have set myself up for potential memory leaks by naively using private lateinit var someViewField: View in my Fragment classes. They aren't nullable, and so obviously I am not nulling them out in onDestroyView() as seems to be needed.

    • This is specifically called out as a common source of memory leaks in the Leak Canary docs
    • Which also points to this SO answer from Ian Lake describing why and that we do in fact need to null view refs out in onDestroyView()

    This all lead me down the path of looking for a better way than manually overriding onViewDestroyed() and setting every field null in every fragment. While that would work, it's easy to forget when adding a new view reference field, starts to feel like clutter over time, and there has to be a less heavy handed way.

    AutoClearedValue

    I started down a path of a custom Annotation and some ugly reflection and then ran back across AutoClearedValue.kt in the Google Architecture samples. It seems to be a pretty nice solution so far.

    How are you all approaching this problem?Is AutoClearedValue the best approach?Is there any reason this Class + Extension function aren't part of one of the lifecycle-* packages?Is this problem of view reference leaking even as big of a deal as it seems?

    *EDIT: Fixing onViewDestroyed() -> onDestroyView()

    **EDIT 2 [The "answer"]:
    As with anything in software, the answer seems to be "it depends". If you are comfortable managing some of the potential hang-ups of synthetics from Kotlin extensions, they may be the simplest, and least work path forward. As u/Pzychotix points out below, the generated code appears to clean up references on destroy without any additional work from the developer. The limitations/gotchas are described well in this thread from about a year ago.
    If you're using vanilla findViewById() or View Binding, it looks like AutoClearedValue is a nice solution to the problem. I personally am landing on the side of having AutoClearedValue return nullable references so we are sure not to hang ourselves with a view reference at the wrong lifecycle point(s). That's a personal preference.

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

    Analytics platform that is library friendly?

    Posted: 23 Jul 2020 09:21 PM PDT

    I'm working on a library project and it's becoming a real pain that within my library I can't use Crashlytics to log non-fatal errors or helpful debug logs.

    Crashlytics only works on the app level and I need my project to be integratable into 3rd party apps so I can't rely on there always being there, and I do a lot of background work so I can't assume the library will have been initialized and have access to app level code.

    We have mixpanel integrated but the bill was looking insane for the paid version and the free version is too limited.

    Any suggestions really appreciated!

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

    No comments:

    Post a Comment