• Breaking News

    Friday, December 18, 2020

    Android Dev - Weekly Anything Goes Thread - December 18, 2020

    Android Dev - Weekly Anything Goes Thread - December 18, 2020


    Weekly Anything Goes Thread - December 18, 2020

    Posted: 18 Dec 2020 06:00 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]

    I want to learn custom ROM development. Where do I start?

    Posted: 18 Dec 2020 03:25 AM PST

    I've been interested in custom ROMs for a while now and I'd like to start developing one myself. Where do I start?

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

    Activity/Fragment base class for ViewBinding

    Posted: 18 Dec 2020 06:48 AM PST

    https://github.com/Jintin/BindingExtension

    Want to share this project with you guys, ViewBinding is an amazing tool for Android but it's not so fit in Android development as we still have to do some config. BindingExtension is built to provide a simpler usage.

    Just declare the ViewBinding type in generic way like below.

    For Activity: ```kotlin class MainActivity : BindingActivity<ActivityMainBinding>() {

    override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding.label.setText(R.string.activity_label) } 

    } ```

    For Fragment (note the binding can only used after super.onCreateView(inflater, container, savedInstanceState) and before super.onDestroyView is called: ```kotlin class MainFragment : BindingFragment<FragmentMainBinding>() {

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) binding.button.setOnClickListener { binding.button.setText(R.string.fragment_label) } } 

    } ```

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

    Admob VS InMobi VS StartApp

    Posted: 18 Dec 2020 01:53 AM PST

    Hello everyone!

    I am close to publishing my own app and was wondering if anyone had experiences in using these three different ad providers and how they compare. I know Admob is probably the most popular, but I also hear their impression rates are quite low, though I can't find any monetisation information regarding the latter two.

    Not sure which one I should utilise... I am mainly thinking of using banner ads or native ads

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

    To Present an app for a client ( company ) as an Independent Dev, what are the things to talk about/mention in the PPT slide ?

    Posted: 18 Dec 2020 07:00 AM PST

    Android mobile number length validation

    Posted: 18 Dec 2020 05:46 AM PST

    Hello,

    How can we validate the length of a mobile number by COUNTRY? (Knowing that the country code might or might not be part of the number)

    Any idea where can I find each country's mobile number length range? It is for validating mobile numbers so they would be in a specific length range.

    Example:

    • +1 222 2222 222 (13 digits) Valid ✔️
    • 222 2222 222 (12 digits) Valid only if chosen in corresponding Locale ✔️
    • +1 222 2222 2222222 (17 digits) Invalid ❌
    • +1 222 2222 (8 digits) Invalid ❌

    Length may vary per country, meaning there should be a length range or pattern validator.

    Thank you!

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

    AdMob impressions increased but number of clicks have dropped

    Posted: 18 Dec 2020 03:20 AM PST

    AdMob impressions increased but number of clicks have dropped

    My app has AdMob banner at the bottom of a screen. On Dec, 6 number of ad clicks decreased while the number of impressions doubled. Why did it happen?

    Impressions and Clicks charts

    Could this be related to migration from Smart banner to Adaptive banner?

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

    Can someone help me choose between these two courses?

    Posted: 17 Dec 2020 06:33 PM PST

    If it helps Im very well versed in Python and know a little bit of C so Im not a complete beginner to programming.

    https://www.udemy.com/course/the-complete-kotlin-developer-course/

    https://www.udemy.com/course/android-kotlin-developer/

    Im new to buying courses and stuff so I was wondering if the sale ending in 5hrs is actually legit or just a way to get me to buy stuff

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

    How to do conditional testing using Espresso

    Posted: 17 Dec 2020 07:19 PM PST

    By "conditional", I mean, the test class will have to check some condition first before running a test. For example, if I have a recycler view grid with clickable items that take me to another activity, how do I tell espresso to only run a test related to that activity navigation only if the adapter, and consequently, the recycler view has items in it. Because otherwise, if it's empty, then the test would definitely fail for not finding a single item to perform clicks on.

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

    Android dev env with docker

    Posted: 17 Dec 2020 03:19 PM PST

    Not sure if this is unorthodox or not, but my current work environment prevents me from downloading packages directly through android studio. I can however download anything I want through docker. So I came up with the solution to use a docker image with base OpenJdk, the android sdk and gradle, build the environment and pull all packages there, and volume mount all of the necessary cache to my local machine for android studio to fetch. Android studio itself would be installed on the computer (not in docker) and would be in offline mode (since it can't fetch anything from the internet anyway).
    So far I: 1. built the docker image 2. created a base android project 3. Built the project in docker with gradle wrapper successfully (including the android plugin, build tools etc)

    I feel like I'm close but I'm having a TON of problems getting it to work with android studio and I'm sure I'm missing something fundamental. What exactly do I need to do from here to make it work?

    Based on what I know so far, there is android cache located in /user-home/.android/build-cache (by default) and gradle cache in /user-home/.gradle (by default). I would think that if I configured android studio to use the two that are volume mounted from docker instead of the folders on my computer, that it would work.

    Android studio has a method to modify the gradle user home, and I've modified that to use the volume mounted .gradle from the docker container.

    Given the above, when I click the "build" button on android studio, I get "no cached version". I tried different things and I feel as though I could use expert opinions.

    Thanks!

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

    How can one write more than 4000 lines of code in a single activity? (the maximum allowed by Android Studio, as I heard)

    Posted: 18 Dec 2020 01:57 AM PST

    I heard that you are not allowed to write more than 4000 lines of code in a single activity in Android Studio. (I have also experienced that personally)

    However, let's say it is absolutely necessary to continue writing code related to the one in the particular activity, and thus have to overpass the previous 4000 lines. What can one do?

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

    I recently received this text message and suspect it to be some kind of malware, however I'm unable to get the preview to load or to copy whatever url is embedded. How can I dump the raw (mms?) message so I can start research it?

    Posted: 17 Dec 2020 05:00 PM PST

    Mobile Developers Cafe - Weekly Newsletter with loads of curated iOS, Android, Flutter, and React Native developer articles/ blogs, events, podcasts, and dev tools delivered to your inbox.

    Posted: 17 Dec 2020 11:28 PM PST

    Changing the instrumentation class in an AS run configuration

    Posted: 17 Dec 2020 02:47 PM PST

    I have somewhat of a complex test setup for my Android project and it requires different test runners. I have setup my gradle file so that it switches the test runner according to a project property. That way I can control the test runner when running tests via a Gradle script.

    However, I'd love to do the same with an Android Studio run configuration. But the Instrumentation Class field seems to be grayed out and AS won't let me change it. See here.

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

    No comments:

    Post a Comment