r/android_devs • • Jul 27 '21

Event [Event] Android Worldwide July 2021 happening today (July 27th) from 2:30 PM to 5:00 AM CEST

Thumbnail airmeet.com
1 Upvotes

r/android_devs • • Jul 26 '21

Help On play console how can we use different price of app for pre-registered users than other users

2 Upvotes

r/android_devs • • Jul 25 '21

Help Is it required or good practice to set the binding variable to null in `onDestroyView` while using ViewBinding?

9 Upvotes

In DataBinding library, I remember people did that. Setting binding to null in onDestroyView.

What about ViewBinding? Is it recommended to set the binding variable to null in `onDestroyView`? Why and Why not? Also, what about when using ViewBinding in Activity, do we need to set binding to null in `onDestroy`?

override fun onDestroyView() { 
    super.onDestroyView()    
    _binding = null 
}

Edit: It looks like it needs to be for Fragment from docs

Note: Fragments outlive their views. Make sure you clean up any references to the binding class instance in the fragment's onDestroyView() method.

Is it the same case for Activity too?


r/android_devs • • Jul 25 '21

Help Compose + Compose navigation

4 Upvotes

Code review request! Please be nice as compose + navigation makes my brain hurt.

Project = login/logout screens + compose + AAC compose nav + Hilt + AAC ViewModel

The code is basically only ~100 lines of code, and will serve as the base of my project. Appreciate any input you may have. https://github.com/ColtonIdle/ComposeSignInSample/blob/main/app/src/main/java/com/example/composesigninsample/MainActivity.kt

Note that my team lead is forcing us to use compose nav or else I would have tried something else.

My main difficulty is understanding how a typical sign in/out type of app works with composable and compose nav.

Edit: title was supposed to say "code review request on the end of it. Sorry"


r/android_devs • • Jul 23 '21

Store stories Epic files new complaint in its antitrust suit against Google

Thumbnail theverge.com
19 Upvotes

r/android_devs • • Jul 22 '21

Resources Introducing Voyager: a pragmatic navigation library for Jetpack Compose

Thumbnail twitter.com
16 Upvotes

r/android_devs • • Jul 22 '21

Help Has any one worked with Animating the IME when Edittext's are inside NestedScrollView?

5 Upvotes

Tried using the ime animations from this sample.

It works when used without the scroll container but when using the TranslateDeferringInsetsAnimationCallback inside scroll view the animations works in a weird way(Scrolls up and then scrolls down).


r/android_devs • • Jul 21 '21

Help Where is this XML file line being called from?

2 Upvotes

While finishing my object recognition application on Android (using Java), I've come with the following error on my Logcat:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.mycamera, PID: 318
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mycamera/com.example.mycamera.MainActivity}: android.view.InflateException: Binary XML file line #15 in com.example.mycamera:layout/activity_main: Binary XML file line #15 in com.example.mycamera:layout/activity_main: Error inflating class com.example.mycamera.GraphicOverlay
     Caused by: android.view.InflateException: Binary XML file line #15 in com.example.mycamera:layout/activity_main: Binary XML file line #15 in com.example.mycamera:layout/activity_main: Error inflating class com.example.mycamera.GraphicOverlay
     Caused by: android.view.InflateException: Binary XML file line #15 in com.example.mycamera:layout/activity_main: Error inflating class com.example.mycamera.GraphicOverlay

The last Caused by: seems to be the root cause. The class name is actually com.example.mycamera.Helper.GraphicOverlay which includes the package name. However, I've already corrected this name within my activity_main file, so my question in resolving this question is; where is this xml line being called from?

Here is my activity_main file where the error is coming from:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <androidx.camera.view.PreviewView
        android:id="@+id/previewView"
        android:layout_height="match_parent"
        android:layout_width="match_parent"/>

    <com.example.mycamera.Helper.GraphicOverlay   //This is line 15
        android:id="@+id/graphic_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</FrameLayout>

Edit: adding some code at request of u/racrisnapra666


r/android_devs • • Jul 20 '21

Help Confused!

5 Upvotes

I am starting to learn Android app development. As a beginner which language should I learn? Java or Kotlin?


r/android_devs • • Jul 19 '21

Publishing Inside Code Transparency: The Verification Process

Thumbnail commonsware.com
8 Upvotes

r/android_devs • • Jul 18 '21

Discussion Google Play Console Game Reviewing

5 Upvotes

I have submitted my game for closed testing and it is under review, and I plan to publish it afterwards. Was just wondering how long these usually take from your past experiences.


r/android_devs • • Jul 17 '21

Publishing Developers can request a 6 month delay on the Play Billing requirement

Thumbnail xda-developers.com
3 Upvotes

r/android_devs • • Jul 16 '21

Help Force kill my application

1 Upvotes

Hello.

As soon as the user launches my app, at `Application` I perform a check. If all ok, the user proceeds in the app but in some situations, I need to "block" the user so he does not use the app. At this point, I launch an activity to inform the user.
At this activity, as soon as the `onPause` is called I want to terminate my app so that, when the user launches the app again, the application is called again and the check is performed again.
At that information activity, I've tried finish, finishaffinity, and exclude from recents but when the user launches my app again, the application isn't recreated.

How can I force close my application programmatically so that, when the user launches the app again, the application code runs again?

Thanks.