• Breaking News

    Wednesday, February 24, 2021

    Android Dev - Weekly Questions Thread - February 23, 2021

    Android Dev - Weekly Questions Thread - February 23, 2021


    Weekly Questions Thread - February 23, 2021

    Posted: 23 Feb 2021 06:00 AM PST

    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]

    Android Deprecated Annotation is deprecated.

    Posted: 24 Feb 2021 12:20 AM PST

    Android Deprecated Annotation is deprecated.

    https://preview.redd.it/y3lmpk1ixdj61.png?width=793&format=png&auto=webp&s=8adb81657913887a58dbde42cd6564bd3ab96147

    According to Official Android Documentation Deprecated itself is deprecated in API level S. So what's the replacement for Deprecated which itself is deprecated?

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

    Jetpack Compose is now in Beta

    Posted: 24 Feb 2021 09:05 AM PST

    Just announced in The Android Show: Jetpack Compose is officially in Beta and ready to use starting today

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

    App Rejection/Takedown/Core Functionality Permissions

    Posted: 24 Feb 2021 08:38 AM PST

    Per https://www.reddit.com/r/androiddev/comments/lht9ci/small_randroiddev_rules_update_nothing_too_scary/, I'm trying to detail my app rejection/"takedown."

    I'm at my wit's end here.

    I scratched an itch and started developing this app, on and off, about two years ago. While I had some JavaScript knowledge, I taught myself Kotlin and Android development. I dove into Material Design, AndroidX, Room, Coroutines and you name it. I did this in my spare time while holding down a job, a small child and, well, COVID.

    A couple of years ago, I read about Google's updated permissions and how they affected things, but I didn't go down this rabbit hole in detail. At the time, I reviewed https://support.google.com/googleplay/android-developer/answer/10208820 and felt confident, since my app's core feature is Device Automation, I would simply get an exception. Over the last couple of months in trying to get the app approved, I reviewed the horror stories here in r/androiddev and realized I'm just another one of them, I guess.

    However, with the recent r/androiddev rule update, and Google admitting that my "App prominently indicates that enable users to configure their device to automate repetitive manual actions associated with the OS, based on one or more set conditions (triggers) by the user," as you'll see below, I'm hoping others can help lead me down the right path.

    The third email Google sent is identical to the second and, because the app is currently rejected and stuck in Internal testing at this time, I expect it's not currently available at https://play.google.com/apps/internaltest/4698977682470402015, but I'm happy to add anyone who's interested as a tester.

    Thank you. I never expected the most challenging part of Android development would be getting the app on Google's app store.

    Without further ado, the description:

    Gentlemen's Assistant – Smart SMS/Call Automation (dev.mtc.ga)

    Short Description

    A smart device automation tool for SMS and calls that helps you stay in touch.

    Full Description

    <b>**Gentlemen's Assistant is a smart device automation tool for SMS scheduling and calls that helps you stay in touch with loved ones—and it'll be there for you through life's many distractions.**</b>

    Features

    • Customizable device automation for SMS message scheduling with opportunistic randomization
    • Device automation for phone call dialer, with call reminders, if you haven't made or received any

    · Device automation to prevent sending messages if:

    • You are in a call with your girlfriend
    • You recently missed a call from your girlfriend (configurable)
    • Your girlfriend recently sent a message and you didn't reply back (configurable)

    • Modern Android design with a dark theme
    • Supports multiple people/loved ones (when upgraded)
    • Won't repeat the last message sent
    • Set a maximum number of SMS messages per day, week or month
    • Notifications for upcoming SMS messages (configurable)
    • Notifications populated with conversation history in context and favorite messages (favorite messages are currently available on Android 9.0 and later)
    • Time zone aware (it'll do the right thing regardless of where you are)
    • Upcoming messages can be easily edited, disabled, postponed, skipped or quickly changed to other frequently sent messages
    • History of what messaging actions were taken and why

    Let's face it—girls (and some guys!) love lots of attention and most men can't keep up with this. Rather than forgetting to give your better half the attention they deserve—perhaps you're in a conference call or very busy with work—Gentlemen's Assistant (GA) will, cleverly, send text messages of your choosing to, and prompt you to call, your significant other to remind them that they mean a lot to you.

    Some people are, very much, against automation technology like this, but we believe that anything that can help keep communication high between loved ones is, in the long run, a good thing. GA, by default, will not take any action and largely act as a helpful reminder, and we recommend this type of use.

    Warning: GA works well when used sparingly with simple text messages—perhaps too well. While it'll give your significant other the attention they need, they'll be inclined to reply back and, at this time, GA is not intelligent enough to reply back in context—so you'll need to reply back yourself.

    Tentatively planned features

    · Won't automatically send a message if you recently sent one (configurable)

    · Won't automatically send a message when you're at your girlfriend's place (configurable)

    · Biometric authentication to open app

    · Google Assistant Voice Command support

    · Display actual MMS pictures/content in notifications

    · Enhanced Artificial Intelligence and machine learning

    Helpful Hints

    · GA can be used to regularly touch base with anyone you care about, not just your girlfriend!

    · Use short and sweet, but generic, messages. Sending a simple "I love you" once a day is far better than sending "You looked amazing in that black dress!"

    · Create many short, sweet and generic messages to maximize effectiveness.

    · Disable messages when you and your significant other are together—or select Not Today when notified. While you can schedule messages outside of times you're likely to be together, and we plan to allow you to prevent messages from being sent when you're at your girlfriend's place, you don't want messages to be sent when you are, for example, sitting right next to her at breakfast.

    · Don't wait for an upcoming message to be sent! If you are feeling extra loving, let your loved one know in the moment!

    Known issues

    · RCS support is incomplete. RCS messages will not be displayed properly in notifications and messages will be sent as SMS.

    Please give us your feedback at https://forms.gle/qFBPLTrbeuPWgNiu7!

    Need help or have a question? Our frequently asked questions are at https://sites.google.com/view/gentlemens-assistant-faq. Contact us with questions or submit a support request at https://forms.gle/qFBPLTrbeuPWgNiu7.

    You may find our privacy policy at https://privacy.mtc.dev.

    First appeal email correspondence from Google—their email and my reply (names redacted for privacy):

    Hey <redacted>,

    Thank you for further reviewing the app.

    We rereviewed and made minor changes to both the short and full descriptions of the app and believe the core functionalities/device automation features are prominently documented and promoted in the app's descriptions.

    In reviewing the Exceptions at https://support.google.com/googleplay/android-developer/answer/10208820?visit_id=637449664344101989-4020817198&rd, the app enables the user to automate repetitive SMS messaging and phone calls by using ongoing and recent call and SMS message data using one or more set conditions by the user. This appears to qualify for the Device automation exception as this is the app's core functionality and there's currently no alternative method to provide this core functionality.

    All messages and related conditions are completely defined by the user. The app uses the minimal permissions necessary to support its core functionalities and stores as little data as possible for as short of a time as possible. The app discloses how data is used, collected and its purpose for the app's functions.

    At a time when fostering regular communication with loved ones is more important than ever, the app nicely compliments default messaging and phone call apps.

    Would you please provide further detail as to why you feel our app or descriptions do not match the declared use case?

    Thank you,

    <redacted>

    From: [googleplay-developer-support@google.com](mailto:googleplay-developer-support@google.com)Sent: Wednesday, February 17, 2021 11:51 PMTo: <redacted>Subject: Re: Your message about Google Play <redacted>

    Hi developers at <redacted>,

    Thank you for your patience.

    Due to adjusted work schedules at this time, we are currently experiencing longer than usual process times and we appreciate your understanding.

    I've reviewed your appeal request and found that Gentlemen's Assistant – Smart SMS/Call Automation(dev.mtc.ga) does not qualify for use of [READ_SMS, PROCESS_OUTGOING_CALLS, SEND_SMS, READ_CALL_LOG] for the following reasons:

    • Requested permissions do not match core functionality of the app
      • You declared [Device Automation] as the core functionality of your app. However, after review, we found that your app does not match the declared use case(s). Learn more about permitted uses and exceptions.

    Please either:

    • Make changes to your app so that it meets the requirements of the declared core functionality or,
    • Select a use case that matches your app's functionality

    Core functionality is defined as the main purpose of the app. This may comprise of a set of core features, which must all be prominently documented and promoted in the app's description.

    You need to ensure that your app no longer uses [READ_SMS, PROCESS_OUTGOING_CALLS, SEND_SMS, READ_CALL_LOG] ; failure to do so could result in the removal of your app and may impact your developer account.

    Permission requests should make sense to users. You may only request permissions that are necessary to implement critical current features or services in your application. You may not use permissions that give access to user or device data for undisclosed, unimplemented, or disallowed features or purposes. For additional guidance, please review the Permissions policy and this Play Console Help Center article.

    Please let me know if you have any other questions.

    Regards,<redacted>The Google Play Team

    Secord appeal email correspondence from Google—their email and my reply:

    Thanks for the prompt reply <redacted>, and we appreciate the further detail on our app's descriptions.

    We've recently made minor changes to both the short and full descriptions of the app.

    The short description of the app now states "A smart device automation tool for SMS and calls that helps you stay in touch."

    The long description begins with "Gentlemen's Assistant is a smart device automation tool for SMS scheduling and calls that helps you stay in touch with loved ones—and it'll be there for you through life's many distractions." The features that follow in the description also prominently note the device automation functionality.

    We believe the core functionalities/device automation features are prominently documented and promoted in the app's descriptions and feel our app is in full compliance with the Google Play Developer Program Policies.

    Thank you,

    <redacted>

    From: [googleplay-developer-support@google.com](mailto:googleplay-developer-support@google.com)Sent: Thursday, February 18, 2021 6:30 PMTo: <redacted>Subject: RE: Your message about Google Play <redacted>

    Hi developers at <redacted>,

    Thanks again for contacting the Google Play team.

    I see your app, Gentlemen's Assistant – Smart SMS/Call Automation(dev.mtc.ga), was resubmitted earlier and is currently under our review.

    Unfortunately I'm not able to comment on your planned implementation.

    As I mentioned in previous email, you declared [Device Automation] as the core functionality of your app, but this is not prominently documented and promoted in the app's description.

    App prominently indicates that enable users to configure their device to automate repetitive manual actions associated with the OS, based on one or more set conditions (triggers) by the user.

    If you think your app is in compliance, please submit your app for another review. You may want to review the Developer Program Policies for additional policy guidance.

    Thanks for your understanding and continued support.

    Regards,<redacted>The Google Play Team

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

    How to check the Android Emulator Updates? No updates on the blog.

    Posted: 23 Feb 2021 07:31 PM PST

    https://androidstudio.googleblog.com/ used to have Android Emulator Updates which mentioned all the fixes in the version of the emulator. For example https://androidstudio.googleblog.com/2020/03/emulator-3005-stable.html. But, they are not available for current versions.

    Android Studio show current update available at 30.4.5. But I can't find any thing about the version.

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

    ID check from google

    Posted: 24 Feb 2021 08:06 AM PST

    Hi guys anyone else getting them emails about indentification checks from google? And what do we put on the form when you not a business just a normal guy 😃

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

    Learn XML or just Jetpack compose?

    Posted: 24 Feb 2021 05:34 AM PST

    I just started learning kotlin to better understand Java and statically-typed programming languages, but haven't had any experience with android frontend development. my question is: should I start learning the xml form when jetpack compose exists? Is learning the XML form a prerequisite to understanding Jetpack Compose?

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

    Looking for Open Source Contributor for Notification Server

    Posted: 24 Feb 2021 03:14 AM PST

    Hello together.

    I am working on Notifo since a while: https://github.com/notifo-io/notifo

    It is an Open Source, channel-agnostic notification server. The goal is to provide a simple infrastructure for modern cross-platform services. Today many applications use notifications, for example for marketing, price alarms, collaboration tools and alerts. But there is no feature-complete Open Source system and many companies, that cannot use SaaS systems build something on their own, which is more complicated than it seems at the beginning.

    Notifo handles this, for example:

    * Scheduling and aggregation of notifications

    * Templates

    * Email templates

    * Queues and retry mechanisms

    * Confirmations for important notifications

    Notifo is mainly build by myself but already used in a few production environments. But I am not an Android developer (anymore. So I am looking for somebody who is motivated to help me with this part. The goal is to provide a good sample application and an SDK for easy integration and to steal a little bit of marketshare from the big players like SignalOne.

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

    Is there a way to edit the system default dialer?

    Posted: 23 Feb 2021 08:08 PM PST

    I coded a small voice pitch shifting app that I want to integrate into the system dialer (so you can change your voice in call on the fly). Is it possible to edit the dialer to add extra buttons (on incoming call activity)? Or do I have to make a new dialer completely?

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

    Run Android Emulator on tools window with param

    Posted: 24 Feb 2021 12:52 AM PST

    Hi! Are there any ways to add param when launching emulator in Android Studio tool window? I need to add -dns-server when launching the emulator but I can't find any ways to do that

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

    Android Dev Challenge: lift off with Jetpack Compose

    Posted: 24 Feb 2021 09:33 AM PST

    How long does the SnapKit app verification take?

    Posted: 24 Feb 2021 08:55 AM PST

    Hey, I build an app with Snapchats Login and it's under review currently. How many days does it take until Snapchat approves my app? Has anyone experience with them?

    Thanks

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

    Using the clean architecture, how do you structure your domain with slightly different data objects

    Posted: 24 Feb 2021 07:42 AM PST

    As the title says, say for example you have one endpoint that returns a collection of user objects (corresponding to a list of users), one user object being:

    {
    "id":"123",
    "name":"joe",
    "age":30,
    "premium":"false"
    }

    and then another endpoint that returns another user object (say for a single profile, or even a different list):

    {
    "id":"123"
    "name":"joe",
    "age":30,
    "photo":"url",
    "sex":"female"
    }

    Both API endpoints look at the same data behind the scenes, and your API just gives you a "view"/subset of the whole user data from each endpoint.

    I assume people would create multiple data objects there (?)...

    And then how do you usually design your domain User object? Do you create multiple ones? Or do you tend to use the same one?

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

    How do you detect apps that are developed using stolen code?

    Posted: 24 Feb 2021 03:54 AM PST

    If a person uses an open source project in their own application with tweaks and launches it commercially as their own, is there a way to catch them?

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

    Your go-to analytics

    Posted: 23 Feb 2021 10:17 PM PST

    What would be your best-choice analytics today?

    We used to have MixPanel 6 years ago. Since then Google made a big step forward but it still looks like a mess to me. I might be just sentimental though.

    Are there new kids on the block?

    What say you?

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

    You can build make an app and connect to a MySQL database hosted on a Raspberry Pi

    Posted: 24 Feb 2021 06:21 AM PST

    Here is a walkthrough on how to do it. It includes 7 steps that are easy enough to follow: https://mytechbuild.com/2021/02/13/how-to-build-a-raspberry-pi-android-app-in-7-steps/.

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

    MY play console account is not displaying any in app purchase revenue of my game. according to unity analytics my games has 20 total verified pruchase. but my google play console displays "no revenue data available" my game is already almost 2 weeks old on playstore

    Posted: 23 Feb 2021 08:57 PM PST

    Android Studio 4.2 Beta 5 available

    Posted: 23 Feb 2021 10:04 AM PST

    alternative for Firebase authentication

    Posted: 24 Feb 2021 04:51 AM PST

    Hi All, I am new to Android and trying to create an application using Firebase for authentication and Firestore for data storage. My concern is ,is it good to rely on firebase for saving user data , does google track user using this info? can you suggest if there is any better option than Firebase for authentication data and saving user info.

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

    I made a recycler adapter for mvvm with the boilerplate removed. (no more viewholder classes)

    Posted: 23 Feb 2021 06:41 AM PST

    Are the limitations of today's smartphone technologies stopping developers from making something extra-ordinary in Android?

    Posted: 24 Feb 2021 12:17 AM PST

    Are the apps and the games we see on Android today the most that one can get? Is there something more one can do if smartphones were capable of functioning on par with a gaming-oriented computer?

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

    JCenter shutdown impact on Gradle builds

    Posted: 23 Feb 2021 07:13 PM PST

    If you set your app as a priced app, can you set the discount?

    Posted: 24 Feb 2021 03:49 AM PST

    I mean, I was thinking about launching an app which could cost x$.

    Could I modify that whenever I want as a sale?

    Like, before it was x$ and now x-y$

    Even free the first days or something like that?

    Thanks!

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

    stumbled across this free Flutter course giveaway, thought I'd share

    Posted: 24 Feb 2021 02:49 AM PST

    the info is all in this tweet: https://twitter.com/atsigncompany/status/1363985740854489091

    apparently if you follow this company's Twitter and introduce yourself on their Discord, you'll have a chance to win 1 out of 100 Flutter courses. i haven't taken the course personally, but i've heard from friends that Angela Yu is the BEST.

    if you're not familiar with Flutter, it's Google's mobile app SDK, and it makes app development SO much simpler -- i'd highly recommend checking it out.

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

    Getting Influencers to Play with your Android Apps

    Posted: 24 Feb 2021 05:46 AM PST

    Question on Unit Testing

    Posted: 23 Feb 2021 10:06 PM PST

    Let's say I have this function

    fun doSomething(value: String): String { var transformedValue = value.toLowerCase() transformedValue += transformedValue transformedValue += transformedValue return transformedValue } 

    If I wanna test this, I can just do simple test cases of inputs and outputs. Say, "A" should return "aaa", "B" should return "bbb", etc.

    So now I have another function:

    fun doSomethingAgain(value: String): String { var transformedValue = value.toLowerCase() transformedValue += transformedValue transformedValue += transformedValue return transformedValue } 

    but in this function I want to do the same thing with the other function but more work so I unified the transformation with a helper

    fun doSomething(value: String): String { return transformValue(value) } fun doSomethingAgain(value: String): String { return transformValue(value, true) } // Should be private and used just by these two fun transformValue(value: String, upperCase: Boolean = false): String { var transformedValue = value.toLowerCase() transformedValue += transformedValue transformedValue += transformedValue if (upperCase) { transformedValue = transformedValue.toUpperCase() } return transformedValue } 

    For doSomething , some test cases are:

    • "A" should return "aaa"
    • "B" should return "bbb"

    For doSomethingAgain, some test cases are:

    • "A" should return "AAA"
    • "B" should return "BBB"

    Sounds okay but a colleague prefers a different type of testing where we just test transformValue, then just make sure that doSomething calls transformValue
    For doSomething , test case would be:

    • should call transformValue with params value and false

    For doSomethingAgain, test case would be:

    • should call transformValue with params value and true

    For transformValue, test cases would be:

    • If upperCase is true:
      • "A" should return "AAA"
      • "B" should return "BBB"
    • If upperCase is false:
      • "A" should return "aaa"
      • "B" should return "bbb"

    Personally, I prefer the first method since we just test the functions that would be used by consumers and transformValue is just an implementation detail and that means I'm not tied down to that function and I can refactor and the function still works. I've tried my best to explain this but it seems my colleague prefers the second one which is okay but the test is kind of just putting a guard saying "this function should call this function", not "this function should do this" but it's indirectly tested because the helper function has been fully tested. I feel like this is testing the implementation detail. Both are passing tests but with the discourse we had, I feel like I'm confused now. For me, the unit would be the function exposed to consumers, but for him a unit is the smallest block which is a function.

    Am I in the right track or should I follow my colleague's way? What do you think? If my way is better, what's a good case in point to convince them to change their mindset in testing? If it's his way, how should I go about in thinking this?

    Thanks in advance!

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

    No comments:

    Post a Comment