• Breaking News

    Friday, November 5, 2021

    Android Dev - App Feedback Thread - November 05, 2021

    Android Dev - App Feedback Thread - November 05, 2021


    App Feedback Thread - November 05, 2021

    Posted: 05 Nov 2021 07:00 AM PDT

    This thread is for getting feedback on your own apps.

    Developers:

    • must provide feedback for others
    • must include Play Store, GitHub, or BitBucket link
    • must make a top level comment
    • must make an effort to respond to questions and feedback from commenters
    • app may be open or closed source

    Commenters:

    • must give constructive feedback in replies to top level comments
    • must not include links to other apps

    To cut down on spam, accounts who are too young or do not have enough karma to post will be removed. Please make an effort to contribute to the community before asking for feedback.

    As always, the mod team is only a small group of people, and we rely on the readers to help us maintain this subreddit. Please report any rule breakers. Thank you.

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

    What's the windowing system of android os?

    Posted: 05 Nov 2021 04:35 AM PDT

    We know that in Linux world, we have x11.

    It provides the lowest level for you that you can create windows, handle events, etc,..

    In windows, we have win32.

    What's the equivalent in Android os?

    submitted by /u/0xcc12
    [link] [comments]

    Android 12 Is Killing Phantom Background Processes Of Apps

    Posted: 04 Nov 2021 12:46 PM PDT

    Phantom Processes

    Android 12 via 15755084 and updated via 5706277f has added the mechanism to monitor forked child processes started by apps and kills them if more than the default 32 are found running.

    The app or phantom processes may also be killed if they use excessive CPU, which was done previously too, but only for app process.

    Track the child processes that are forked by app processes

    Apps could use Runtime.exec() to spawn child process and framework will have no idea about its lifecycle. Now track those processes whenever we find them - currently during the cpu stats sampling they could be spotted. If it's consuming too much CPU while its parent app process are also in the background, kill it.

    By default we allow up to 32 such processes; the process with the worst oom adj score of their parents will be killed if there are too many of them.

    This 32 process limit is for all apps combined and not per app.

    Check PhantomProcessList commit history here.

    This change is neither listed in android 12 changes list nor behavior changes and was done silently.

    They were named "Phantom" because they were designed to give android devs nightmares when then saw them (allegedly of course).

    The termux/termux-app#2366 issue was opened in which this was found out and I have added detailed info about it at https://github.com/termux/termux-app/issues/2366#issuecomment-961305970 and a way to disable it.

    Which apps will this affect?

    This will majorly affect all apps that fork child processes from their app process, like with Runtime.exec() or in JNI.

    For Termux app, this killing will affect all commands runs in the shell, which is basically everything the app does and other plugins are designed around.

    For Tasker, this will affect Run Shell, Adb Wifi and some other actions that run shell commands internally, and also the Logcat Entry event profile.

    Expect such processes to be killed at any time if using Android 12.

    This type of killing is seemingly worse than the ones commonly implemented before by OEM killer apps, which are usually tracked by https://dontkillmyapp.com.

    Edit:

    Issue opened at https://issuetracker.google.com/u/1/issues/205156966

    submitted by /u/agnostic-apollo
    [link] [comments]

    Help! Developer account terminated & app removed from Play Store.

    Posted: 05 Nov 2021 07:14 AM PDT

    Two and a half weeks ago we got an email from Google Play Team informing us that our customer's app, that was released end of May this year and of which we've been releasing many updates since then, is in violation of the Malware policy and because of that the developer account was instantly terminated and the app removed from Play Store. This of course came as a shock to us and our customer. There was no warning beforehand, nothing. On top, there was no explanation what the app actually violates against.

    Six days after sending an appeal, we got an answer that they are confirming their initial decision and are not reinstating the developer account. At least, we got some vague information, what the issue supposable is:

    For example, your app, ..., currently contains phishing code that pretends to come from a trustworthy source, requests a user's authentication credentials or billing information, and sends the data to a third-party. This category also applies to code that intercept the transmission of user credentials in transit.

    Of course, we then checked our app for anything that should not be there and would meet the explanation above. We could not find anything. We are using only a couple of well-known third-party services, which are not sending anything related to authentication or billing information. We only use our own authentication API for login reasons and are not sending anything related to it to other services or other parties.

    We wrote back and instantly got turned down.

    So we insisted and told them that we are an honest and trustworthy developing company with many years of app development experience based in Switzerland and that we've been developing this app for a well known company with over 20'000 daily app users.

    The answer then was that they will look into it!

    That was nine days ago and since then we asked twice about the state and got the answer that they are still investigating...

    It has now been 17 days since our customers Android app has been removed from the store and we are unable to release any updates or even access the account.

    We are writing this article because we our desperation is growing by the day.

    Did anyone have a similar experience and / or can anyone give us any advice of how to proceed?

    submitted by /u/Suspicious-Ad8406
    [link] [comments]

    The second episode of DESIGN WITH THE ITALIANS is live. Ivy and Chris from Google tell us everything about Material Design, Material You and how to use colours ��

    Posted: 05 Nov 2021 04:16 AM PDT

    Is it good practice to create separate models for each recyclerview adapter?

    Posted: 05 Nov 2021 07:35 AM PDT

    I have my main models in the domain layer, sometimes the recyclerview only needs a couple attributes from it, does it make sense to create a separate model just for that or is it "okay" to just use to big model?

    example: product model has "id, title, image, price, availability, available quantity etc"

    and my recyclerview only needs the title and the image

    thoughts?

    submitted by /u/MR-POOPY-BUTTH0LE
    [link] [comments]

    Multiplatform Compose and Gradle module metadata abuse – Jake Wharton

    Posted: 04 Nov 2021 06:42 PM PDT

    Unable to instantiate activity ComponentInfo

    Posted: 05 Nov 2021 08:10 AM PDT

    Hi everyone,

    I'm 100% (more like 200% ;)) new to Android developing.
    While I have written a lot in java in the past, this is my first time writing java for an Android application. Also my first time using Android Studio, I really like it!

    When trying to run my app it crashes instantly. I think it has to do with me messing with the tabs. Could someone please help me further?

    Thanks in advance!

    I get this error:

    E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.wijnhuisweertbalansapp, PID: 13840 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.wijnhuisweertbalansapp/com.example.wijnhuisweertbalansapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2679) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:152) at android.view.ContextThemeWrapper.getTheme(ContextThemeWrapper.java:157) at android.content.Context.obtainStyledAttributes(Context.java:655) at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:839) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:806) at androidx.appcompat.app.AppCompatDelegateImpl.findViewById(AppCompatDelegateImpl.java:630) at androidx.appcompat.app.AppCompatActivity.findViewById(AppCompatActivity.java:223) at com.example.wijnhuisweertbalansapp.MainActivity.<init>(MainActivity.java:24) at java.lang.Class.newInstance(Native Method) at android.app.Instrumentation.newActivity(Instrumentation.java:1174) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 
    submitted by /u/GabenLovesShrek
    [link] [comments]

    OnTouchListener on password toggle?

    Posted: 05 Nov 2021 06:01 AM PDT

    Hey guys, I recently started learning Kotlin and Android and I'm stuck on something really stupid for few days now. I need to use OnTouchListener to reveal password only when toggle is pressed down, not on click. I made some custom button to do that but it doesn't look as good as passwordToggle. Is there any way to use onTouchListener in combination with passwordToggle?

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

    Is there any way to determine the scroll direction with lazycolumns in compose? (i.e: user is scrolling up or user is scrolling down)

    Posted: 05 Nov 2021 12:44 AM PDT

    Recyclerviews had an onScrolled listener and based off the given dy value you could determine direction.

    Can't seem to find a way of doing so with a lazycolumn in compose.

    Anyone have any ideas?

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

    LottieDialog 1.0.0 is on MavenCentral now, suggestion are welcome

    Posted: 05 Nov 2021 04:17 AM PDT

    Spent 4 hours trying to make my http request work

    Posted: 05 Nov 2021 07:18 AM PDT

    Only to realize android by default doesn't allow requests sent via cleartext/without ssl

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

    Looking for a project with tests. Lots of tests.

    Posted: 04 Nov 2021 02:17 PM PDT

    I have seen tons of projects, samples, libraries, apps with different design patterns like MVVM, MVI, MVP, with clean architecture, with cutting-edge android libraries, with compose, and so on. But I haven't seen any of them with tests. Unit tests on all layers. Datasources (network clients, databases), repositories, viewmodels. And if some of those projects have unit tests, these are mostly very basic tests. Not even say about UI tests. These are like an utopia for Android projects.

    So let me see what you have to share.

    submitted by /u/gts-13
    [link] [comments]

    Default constructor in android.app.ListActivity is deprecated

    Posted: 04 Nov 2021 08:27 PM PDT

    I followed an old tutorial to setup a sample app for Wear OS that shows a list of installed apps, and displays them in a list with their icons. The only issue is that my MainActivity shows, "Default constructor in android.app.ListActivity is deprecated". The app still works right now, but it's only a matter of time until it doesn't. Could someone please offer me advice on how to update it?

    Thank you so much!

    Here is a copy of the project if you need to see it:

    https://drive.google.com/drive/folders/1KM6CVwQ9mtghrECRT4FcN2yLWjwtWm5J?usp=sharing

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

    Issues with multi-select dropdown

    Posted: 04 Nov 2021 10:50 PM PDT

    Hi guys! I'm currently having issues trying to implement a custom view into my app. I need to create a multi-select dropdown view, I tried using material design's API, but it doesn't support a multi-select alternative, when you tap an item the menu will close. Also, It only works with ArrayAdapters, so I think I cannot use MD approach.

    Any Thoughts on this? How should I approach this?

    Also, I'm a Junior Dev, so don't expect me to know everything haha

    Thanks!!!

    https://material.io/components/menus/android#using-menus

    I need to create something like this:

    https://cdn.dribbble.com/users/112375/screenshots/4958808/multi-select-dropdown.png

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

    Anyone ever fix this problem? about MutableStateFlow on ActivityLifecycleCallback

    Posted: 04 Nov 2021 07:07 PM PDT

    How many of you have live apps on google playstore ?

    Posted: 05 Nov 2021 01:14 AM PDT

    Let's discuss and show each other our apps .

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

    At a BLE / Android "learning" crossroads.

    Posted: 04 Nov 2021 04:18 PM PDT

    My BLE device is programmed to send one byte of data when I want it to, and I want it to trigger my Android phone to do something, given byte 00 or byte 01. (For example, to turn on and off my flashlight, or prompt a beep)

    I need to dig into smartphone development now but I found that there are several options to choose from.

    I only have patience for one learning path. Simpler is better, but it needs to be one of the industry standard solutions for my purpose. I thought of two so far:

    1. nRF Connect. It's what I have now and I used it extensively to troubleshoot my Nano33BLESense when it communicates via BLE. But is it a good (or bad) starting place for development? Cursory research led me to thinking that it's quite complex, and might need me to begin learning Zephyr as well. (sounds daunting)
    2. Android Studio. Working with Kotlin sounds good to me. Learning Kotlin is similar to learning Java, which I've wanted to learn. This would be working with a new toolchain for me, though, but it seems much simpler than nRF Connect's SDK, by comparing them from the vids and documentation I've seen. I'm leaning this way, but I haven't learned enough about it.
    3. Something I've not heard of yet.

    What can I develop so that my BLE device will turn on my Android's flashlight?

    Which is best out of options 1 and 2, or can you tell me something I've not thought of?

    crosspost: androiddev, arduino ble

    View Poll

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

    Retrofit/OkHttp cache control

    Posted: 04 Nov 2021 10:54 AM PDT

    1. I don't ever remember seeing any cache control header in mobile clients. What are some use cases where you need this header?

    2. What is the default cache control for retrofit and okhttp? no-cache?

    3. Usually you would cache using your own repository layer logic into memory or DB, what use case mobile would need caching at okhttp retrofit level?

    4. One case might be for image loading. Client have no idea if an image has changed or not, so cache control header might help. But usually recommended practice for such http resources is to use different file name once image has changed. In that sense, you don't need cache control either.

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

    Dagger 2 - component dependency - nullify dependencies

    Posted: 04 Nov 2021 02:13 PM PDT

    Components have different life span.

    What happens when you specify a dependency: A depends on B, but you destroy B while A is still alive?

    1. If the behaviour is crashing then anyway to safeguard this?

    2. On the other hand, sub component will never have this issue since parent component always outlive sub component, is this assumption right?

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

    Any way to disable the list view/recycler views ending swipe/expanding animation on android 12?

    Posted: 04 Nov 2021 01:29 PM PDT

    When you hit the end of a list, you get it where the list will do this expand animation when you swipe up making the entire list look weird and it just doesn't look right. Anyone know a fix/option or something in code to remove it?

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

    PLEASE HELP! Getting ADB errors while trying to command my phone

    Posted: 04 Nov 2021 07:03 PM PDT

    I'm trying to change my Pixel 5a's back button to the right side, since I'm right-handed (like 70-95% of humans).

    I'm trying this command:

    adb shell settings put secure sysui_nav_bar "space,contextual;home;back,space"

    But PowerShell complains:

    /system/bin/sh: home: inaccessible or not found

    /system/bin/sh: back,space: inaccessible or not found

    I don't really know what this means. It sounds like ADB or PowerShell or whatever can't find a command that's supposed to be there. How do I make this work? If there's a different command I can try, what is it? All I want is for the stupid back button to be on the right side of the navigation bar! This has literally been the default navigation option for every Android phone I have ever owned!

    Please, please help!
    Thank you for any assistance you can provide!

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

    Cédric Champeau's blog: Multi-repository development made easy

    Posted: 04 Nov 2021 11:45 AM PDT

    No comments:

    Post a Comment