• Breaking News

    Saturday, November 13, 2021

    Android Dev - Little rant about Android 12 API release

    Android Dev - Little rant about Android 12 API release


    Little rant about Android 12 API release

    Posted: 13 Nov 2021 01:34 AM PST

    Android 12 is out and, like every year, there is a list of changes if you build for it and changes for all apps.

    As a good Android developer (I believe I am), I'd like to embrace the new features as soon as possible.

    First thing: new splash screen. Nice! What do I have to do?
    Just use this new library ... in version alpha1 (or alpha2 if you take a minute to look). Is there another way? Of course there is. Just use a normal Activity? But, shouldn't we use AppCompatActivities and FragmentActivities I hear you say? Yes, but they do not support it (yet).
    OK then, try this alpha lib. You have to use a theme, which is a sub theme of SplashTheme (not AppCompatTheme) -.-

    Ignore this splash screen for a minute and take a look on additional things to change. You have to define PendingIntents mutability. If you use Geofences (the way I do) the Intents must be mutable. So give them this new flag. Problem is, the new guy added all new flags to the linter on a Friday at 4 P.M. and wanted to leave work quickly. So all new Flags have the Prefix "android" and are not recognized.
    Thanks for nothing I guess.

    I really don't like how everything is a warning if you don't use API 31 right now, but you can't if you don't want to use libraries in an alpha state or need to fall back to normal Activities like it's Android 2.

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

    Why does music sound crappy once I turn on the Emulator?

    Posted: 12 Nov 2021 03:56 PM PST

    I am using a M1 mac and listening to Apple Music using the Airpods pro. It is all fine until the moment I turn on Emulator, the music quality will suddenly become super crappy. Once I turn off the Emulator and Android Studio, the music will return to normal.

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

    Jetpack Compose: Tabs with swiping

    Posted: 13 Nov 2021 03:15 AM PST

    At what point is a dependency injection framework actually needed?

    Posted: 12 Nov 2021 03:07 PM PST

    So I've used manual dependency injection a lot before in previous projects (without knowing it was called DI) but now I see Hilt and Dagger and such are used everywhere. It seems to me that for small/medium apps manual dependency injection is perfectly fine and that such frameworks overcomplicate code. Obviously there's something I'm missing here because these frameworks are extensively used. Can someone outline the benefits I get from using Hilt in my small app?

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

    Do you recommend obfuscating the app each time (e.g. with R8 IIRC ProGuard)?

    Posted: 13 Nov 2021 07:57 AM PST

    Composition, inheritance, delegation, interface, which one do I use?

    Posted: 13 Nov 2021 06:47 AM PST

    So in my Android app, I have copied and pasted a few functions into different activities/fragments. I want to have all those functions in one file so that way I can extend my activity/fragment to use that file and not have the same function duplicated in multiple parts of my project, rather just have it in one place so it can be reused.

    What is the best practice in Kotlin for achieving this? Composition, inheritance, delegation, interface, or something else that I didn't mention in the title? I am not sure which one to pick.

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

    Error while installing CA cert for EAP-TLS

    Posted: 13 Nov 2021 01:47 AM PST

    When trying to setup an EAP-TLS connection for my Wi-Fi authentication. I have to install CA cert and a user certificate in my device. This use to work perfectly fine until I upgraded my phone to android 11.
    Now , my phone doesn't gets authenticated with radius server and in my radius logs it shows

    (26) eap_tls: ERROR: TLS Alert read:fatal:internal error (26) eap_tls: TLS_accept: Need to read more data: error (26) eap_tls: ERROR: Failed in __FUNCTION__ (SSL_read): error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error (26) eap_tls: TLS - In Handshake Phase (26) eap_tls: TLS - Application data. (26) eap_tls: ERROR: TLS failed during operation (26) eap_tls: ERROR: [eaptls process] = fail (26) eap: ERROR: Failed continuing EAP TLS (13) session. EAP sub-module failed 

    I have tested this with different phones and in all android 11 and above I get the same error, whereas it works perfectly fine for devices having android 10 and below.

    Can anyone help me understand why am I getting this error and how do I overcome this?

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

    Please help me get into my Android with the broken screen and a passcode..

    Posted: 13 Nov 2021 05:27 AM PST

    I spent hours looking for ways to get data from my phone which has a broken screen, and every advice that I can find requires either one of these things to be accessible, either I need to be able to see something on my screen, the phone's USB debugging has to be on or the phone should be without the sceen lock.. ANY ADVICE??

    - USB debugging bridge is off

    - The screen is completely black

    - My phone has a passcode on

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

    Injecting ViewModel using Vanilla Dagger 2

    Posted: 12 Nov 2021 07:08 PM PST

    Trying to grasp virtual sim architecture - eSim

    Posted: 13 Nov 2021 03:48 AM PST

    Recently i came across website where in order to create account I needed to provide valid phone number. So i went to search how to get around this and I came across solutions like TextMe app which somehow creates virtual sim on your android device and provides you with a valid phone number.

    This got me very curious about the whole architecture of that concept. I didn't try out that app, but i would assume that developing this kind of app would require you to have some server where you can map your mobile users to some virtual phone numbers. (correct me if I am wrong)

    I was thinking of trying to implement something similar for myself (mainly to gather more experiance, since this sounds like some major project).

    Does anybody have some experience in this particular niche od apps? I am searching for general idea of have this would be implemented and what would be architectual requirements.

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

    Realm Access Error on Android 12 devices.

    Posted: 13 Nov 2021 01:10 AM PST

    Hello Everyone, I have been facing a crash due to realm access error specific to android 12 devices. I have not been able to find any solution online.

    p.s. On previous android version it works really fine.

    Due to company policy I won't be able to share code but I can share the error,

    io.realm.exceptions.RealmFileException: Unable to open a realm at path 'data/data/app_name/files/db_name.realm' : Realm file decryption failed

    in /Users/cm/Realm/realm-java-release/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 107 Kind: ACCESS_ERROR.

    Please help me out. If you have ever faced this issue, please let me know how you fixed it.

    Thanks.

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

    Following the architecture

    Posted: 12 Nov 2021 09:01 PM PST

    Can anyone share their tips/experience for the best practices in following a certain architecture like MVVM, MVI,etc? In my case, when I follow MVVM, my fragment class becomes more bulky than viewmodel.

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

    Data safety in Play Console

    Posted: 12 Nov 2021 11:40 AM PST

    Hi

    About the new Data safety in Play Console.

    Is Google AdMob considered to be collecting user data?

    Review what you collect, send to your servers, or share with 3rd parties

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

    Move contextual action menu at the bottom

    Posted: 12 Nov 2021 12:17 PM PST

    Does anyone have experience with moving the contextual action menu at the bottom of the screen instead of the top? I mean like if you long press an item in a file manager, the Delete, Share etc buttons show up at the bottom, not at the top menu after calling startSupportActionMode(callback). For example Solid Explorer has it at the bottom, but I'm not sure if they somehow moved the actual menu at the bottom, or they have a fully custom solution that looks like the casual top menu. I just can't find any solution to moving it down or using some library, I'd like to avoid having to create a custom solution with calculating how many icons should be visible etc.

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

    Good Simple Bluetooth examples

    Posted: 12 Nov 2021 01:27 PM PST

    I've now been looking for hours for android bluetooth examples, that are relatively recent and not as vague as the android developers page.

    Maybe some of you can point me to some good tutorials, or a github project with bluetooth one of you created

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

    Get all TextViews with Accessibility service

    Posted: 12 Nov 2021 01:22 PM PST

    Hi guys,

    Iam trying to build password manager. Google recommend to use android autofill framework, but that doesnt work in google chrome. So I have to use android accessibility service. But when user click on some text input e.g. username I get AccessibilityEvent for the one text input and I need to fill the seccond one e.g. password text input. So how should I do that? My idea was that I could get all text views on the click event and fill them.

    So better question is how can I get view from AccessibilityEvent type?

    If you have any queston feel free to ask!

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

    Android VideoView Resizing Algorithm

    Posted: 12 Nov 2021 12:28 PM PST

    I am using VideoView to play videos on Android. Can anyone help me understand the resizing algorithm used to resize the video to fit the screen of the device? Whether it bilinear or bicubic? Whether the upscaling is hardware or software upscaling?

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

    'Generate Signed Bundle/APK' does nothing

    Posted: 12 Nov 2021 11:21 AM PST

    I'm trying to sign my first bundle with an upload key so I can upload it and get things going with Play App Signing for a preliminary internal release. Following this guide:

    https://developer.android.com/studio/publish/app-signing#generate-key

    I go through the instructions in 'Generate an upload key and keystore' and 'Sign your app with your key' but when I get to the end (select variant, press finish) nothing happens, it doesn't build. I have no idea what I'm doing wrong.

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

    No comments:

    Post a Comment