• Breaking News

    Tuesday, April 13, 2021

    Android Dev - Weekly Questions Thread - April 13, 2021

    Android Dev - Weekly Questions Thread - April 13, 2021


    Weekly Questions Thread - April 13, 2021

    Posted: 13 Apr 2021 06:00 AM PDT

    This thread is for simple questions that don't warrant their own thread (although we suggest checking the sidebar, the wiki, our Discord, or Stack Overflow before posting). Examples of questions:

    • How do I pass data between my Activities?
    • Does anyone have a link to the source for the AOSP messaging app?
    • Is it possible to programmatically change the color of the status bar without targeting API 21?

    Large code snippets don't read well on reddit and take up a lot of space, so please don't paste them in your comments. Consider linking Gists instead.

    Have a question about the subreddit or otherwise for /r/androiddev mods? We welcome your mod mail!

    Also, please don't link to Play Store pages or ask for feedback on this thread. Save those for the App Feedback threads we host on Saturdays.

    Looking for all the Questions threads? Want an easy way to locate this week's thread? Click this link!

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

    Can we get downloads ( 100K - 1M ) without marketing and advertisements if our app is pretty good? Share your Experience.

    Posted: 13 Apr 2021 02:46 AM PDT

    Advice on adding better testing to legacy apps?

    Posted: 13 Apr 2021 06:28 AM PDT

    By legacy app I mean an app that was written by people who are no longer at the company and contains bad code that's hard to unit test. All the "best practices" articles I read for android say an app should rely mostly on small tests and use only a minimal number of large tests. However this doesn't seem viable for legacy code where adding small tests usually requires understanding an refactoring complex code that was written by someone who's not there. Adding large tests first seems like the most obvious place to start.

    Does anyone have any advice for adding better testing to legacy apps?

    submitted by /u/No-Let-1734
    [link] [comments]

    AudioEncoder vs OutputFormat

    Posted: 13 Apr 2021 07:31 AM PDT

    Hi everyone!

    I'm new in the audio field and I know nothing about it. I am studying the MediaRecorder class to create an app to register your voice but I cannot understand the difference between MediaRecorder.OutputFormat and MediaRecorder.AudioEncoder. I know the audio usually is compressed in with different algorithmics like MP3 or MP4, so why should I need 2 classes instead of just one?

    Thanks for your time :)

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

    Do google play review apps changes separately? I noticed that if i upload a new version of my app google only takes hours to review but if i change the store listing(even just adding a single word) it would take days to review.

    Posted: 13 Apr 2021 05:48 AM PDT

    my question if i change the store listing and upload a new apk will the apk be block by the store listing then it would take days to review instead of hours?

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

    What do you want to achieve as an app developer?

    Posted: 13 Apr 2021 04:27 AM PDT

    What is motivates you to learn (or) grow as a developer?

    View Poll

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

    Using DataStore With Kotlin Serialization

    Posted: 12 Apr 2021 02:07 PM PDT

    NEED SOME INSIGHT AND SUGGESTIONS (ARcore)

    Posted: 13 Apr 2021 05:41 AM PDT

    So guys I'm new to Kotlin-android dev-in general And I want to make an app that recommend accomodations n rentals for its users like Airbnb but with AI

    Also I wanna add the feature to render physical furniture to see if the apartment he's gon rent will fit his furniture and so on

    I know that this is related to ARcore & depth AI

    Can anyone give me some insight about how is this will be implemented 👉🏻👈🏻

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

    What I appreciate about Android Dev interviews: Very little whiteboarding.

    Posted: 12 Apr 2021 09:11 AM PDT

    Sure, there' might be an "implement this feature" or "build this small people counter" mini-project to show you're not an idiot, but since I first started interviewing for Android Dev positions I have rarely encountered Leetcode/Hackerrank/whiteboarding problems. Like, enough times to count on one hand and not run out of fingers.

    It's a major relief, and part of the reason I'm enjoying this field so much.

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

    Best way to deal with data type based on enum with Retrofit?

    Posted: 12 Apr 2021 04:46 PM PDT

    Hello, I'm working on a project using retrofit and kotlinx serialization and I'm running into a snag. Basically I'm making a request from an API that returns this:

    activity { id: Integer userId: Integer occurredAt: String (dateTime) type: String (Enum: [NEW_POST, NEW_COMMENT, HIGH_RATING, GITHUB_NEW_REPO, GITHUB_NEW_PR, GITHUB_MERGED_PR, GITHUB_PUSH]) data: ??? (model based on enum value) } 

    Then from here, I have an ActivityModelClass that looks like this:

    @Serializable data class ActivityModel( @SerialName("id") val id: Int, @SerialName("userId") val userId: Int, @SerialName("occurredAt") val occurredAt: String, @SerialName("type") val type: FeedEnum, @SerialName("data") val data: ????? <- This could be PostModel, CommentModel, RatingModel, or GitHubEventModel ) 

    Then finally for the enum class:

    @Serializable enum class FeedEnum { @SerialName("NEW_POST") NEW_POST, @SerialName("NEW_COMMENT") NEW_COMMENT, @SerialName("HIGH_RATING") HIGH_RATING, @SerialName("GITHUB_NEW_REPO") GITHUB_NEW_REPO, @SerialName("GITHUB_NEW_PR") GITHUB_NEW_PR, @SerialName("GITHUB_MERGED_PR") GITHUB_MERGED_PR, @SerialName("GITHUB_PUSH") GITHUB_PUSH } 

    So basically what I'm asking is, in the ActivityModel class, how do I set the data type for the member "data" based on the value of the enum? So if the enum is NEW_POST, data should be of type PostModel, NEW_COMMENT would be CommentModel, etc.

    I tried making an open parent class and that did allow the app to run, but then I couldn't access the child class's attributes when I was trying to use Log.d.

    Thanks for any help, I'd really appreciate it. I'd prefer to continue using kotlinx serialization but if this is much easier with something like moshi, that's fine with me. I'd prefer to avoid gson if possible.

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

    The Play Store's App Bundle requirement is a security problem. How do we mitigate it?

    Posted: 12 Apr 2021 02:15 PM PDT

    Context:
    Historically, developers published apps to the Play Store by building an APK, signing it, and then uploading to the Play Store. The signing part is important, because it allows users/the OS to verify that the file does in fact come from the developer, and that it has not been modified in any way.

    In August, the Google Play Store is requiring that all new apps use the App Bundle format. When you use this format, your users don't download a file that the developer created, signed, and uploaded. Rather, they receive a file the Google has assembled and signed. This means Google can insert stuff into the build, and it will be very difficult for the user or the developer to detect.

    This is a MAJOR security issue.

    I'm not optimistic that Google will abandon this policy. So are there any technological measures that developers can take to verify the integrity of software delivered through the Play Store?

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

    Google announced Android Open Source Project (AOSP) support for Rust

    Posted: 12 Apr 2021 11:47 PM PDT

    Possible to get Hacker's Keyboard modifiers to work like modifiers on a physical keyboard?

    Posted: 12 Apr 2021 04:04 PM PDT

    My question is about Hacker's Keyboard open-source app on android.

    I was curious if it was possible to edit the software to make it work more like a physical keyboard.

    For example, with a physical keyboard, you hold down a modifier like Ctrl and then press another key, then you simply let go of the modifier. It only takes two keystrokes.

    However, with this soft keyboard, you have to press the modifier once to toggle it on, then press another key, and then press the modifier again to toggle it off. This takes three keystrokes.

    So is it possible to make the modifiers on the soft keyboard work like a regular keyboard (no toggle, just hold and let go)?

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

    Do people find using Xamarin or .net MAUI to work well with Android apps or suggest learning java

    Posted: 13 Apr 2021 12:22 AM PDT

    Looking to make a web app and ios and Android but only know c#, trying to find the best route

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

    How Good Are Mobile App Development Titles ?

    Posted: 12 Apr 2021 05:13 PM PDT

    Hi everyone,

    I am a graduate MS in CS student in the US and took some courses related to mobile application developement and also taking my internship as a mobile app developer this summer, so I was wondering if someone who is working in this field could briefly explain how good the situation for mobile app developers is in the US, like the job oppenings, demand, growth, reliability, salary and etc compared to other software developement positions and maybe pros and cons of this specific field.

    Any insight would be appreciated, Thanks in advance!

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

    Another rejection after an otherwise splendid interview. What do I do?

    Posted: 12 Apr 2021 02:21 PM PDT

    Pretty much what the title suggests. I've, admittedly, only begun my job hunt in the past month but I'm not making any headway in the hiring process of anywhere I apply to. To try and illustrate that process:

    • I always get the initial phone screen, so I doubt it's my resume
    • Callbacks for the technical are an almost-always, so I'd say I'm pretty personable
    • Technical interview goes well, solid conversation with lead engineer/manager/COO
    • Then the rejection email...

    I'm trying to nip this in the bud before it becomes a problem. Clearly, there must be a problem with some aspect of my technical knowledge, but the people I interview with don't respond with any feedback when I ask, of course. What I do know is I'm clearly personable enough to want to talk to and desirable enough to put me in the same room as a C-level employee.

    If anyone has some perspective or advise I'd love to hear it. Cheers.

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

    Older Android Versions no longer working for app?

    Posted: 12 Apr 2021 10:21 AM PDT

    Hello,

    I'm having users complaining about how they're no longer able to access our app with older versions of android. Anyone else hearing similar complaints? Did I miss an update or something? Many thanks for any help.

    App in question: https://play.google.com/store/apps/details?id=com.BVP.NoStranger&hl=en_US&gl=US

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

    No comments:

    Post a Comment