• Breaking News

    Wednesday, November 17, 2021

    Android Dev - Consuming Activity Results using coroutines: Part 1

    Android Dev - Consuming Activity Results using coroutines: Part 1


    Consuming Activity Results using coroutines: Part 1

    Posted: 17 Nov 2021 08:40 AM PST

    Designing an App for both Android and Desktop using Compose

    Posted: 17 Nov 2021 10:34 AM PST

    We want to create an app using Jetpack Compose for Android. But as we might want to also release a desktop application later we would like to design the app correctly so that it should be really easy to later create a Jetbrains Compose project that shares all of the UI and logic code.

    So if we were to use ViewModel that is troubeling because then the logic cannot directly be used in Jetbrains Compose. But we were thinking about using Koin instead of Hilt for DI.

    Do you have any articles or tips which patterns and libraries to use?

    Thanks in advance.

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

    How is Snapchat able to continue uploading new versions to Play while still targeting API level 29?

    Posted: 16 Nov 2021 08:04 PM PST

    Snapchat has been pushing new versions of their app over the past several days (well past the November 1st deadline to target 30) targeting API level 29.

    The most recent build - 11.55.0.28 was published just yesterday, and sure enough doesn't target 30.

    Any idea how they're able to do this?

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

    Testing Jetpack Compose with Robolectric

    Posted: 17 Nov 2021 09:42 AM PST

    I'd like to share the result of my research on writing pure JVM unit test of composables. Hope this will help someone.

    To app/build.gradle add these dependencies:

    testImplementation 'junit:junit:4.13.2' testImplementation 'org.robolectric:robolectric:4.7' testImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"

    Add also the following lines to app/build.gradle:

    android { // ... testOptions { unitTests { includeAndroidResources = true } } }

    And now the basic test could look like the following:

    ```kotlin package com.example.testingcompose

    import androidx.compose.material.Text import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.onNodeWithText import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config

    @RunWith(RobolectricTestRunner::class) @Config(instrumentedPackages = ["androidx.loader.content"]) class ExampleUnitTest {

    @get:Rule val rule = createComposeRule() @Test fun basicTestCase() { rule.setContent { Text("Hello, World!") } rule .onNodeWithText("Hello, World!") .assertExists() } 

    }

    ```

    @Config(instrumentedPackages = ["androidx.loader.content"]) is a workaround for https://github.com/robolectric/robolectric/issues/6593

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

    Partitioning Chrome's Code for Faster Launch Times on Android

    Posted: 16 Nov 2021 10:50 PM PST

    Can android run on a device without GPU?

    Posted: 17 Nov 2021 12:51 AM PST

    I am wondering if android can run on a device without a GPU at all, so all graphics acceleration is disabled?

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

    Printer Option to App

    Posted: 17 Nov 2021 08:19 AM PST

    Hi,

    I don't if this question apply to the rule. If it does, you are welcome to delete it or direct me to a source that does accept it. Because honestly I am new to developer world, in the form of asking help online.

    Does anybody know if printer option from an email pdf sync to an Android app, rather than sync to the actual printer?

    Thank you

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

    Jetpack Navigation dot indicator

    Posted: 17 Nov 2021 09:11 AM PST

    Is there a dot indicator library or a way to implement dot indicators with Jetpack Navigation? I did short research and I wasn't able to find anything, there are only solutions for viewpager.

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

    With Jetpack Compose, do we still need SurfaceView?

    Posted: 16 Nov 2021 11:56 PM PST

    In the past, SurfaceView is the way to ensure smooth UI operation while the view is being drawn. I just want to check if Jetpack Compose, is there still a need to have SurfaceView?

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

    [Russia] How to fill out W-8BEN-E form for Google Admob if our app dev company and office is in Russia?

    Posted: 17 Nov 2021 02:10 AM PST

    So my company Android app development company is incorporated Russia and sells in-apps via Google Play all over world + earns Google Admob ad revenue. Today Google Payments sent me mail to fill out W-8BEN-E forms to fill out in United States tax info.

    https://i.imgur.com/bslrYcG.png

    One thing is unclear. Should I click the option that says:

    " Derives the item(s) of income for which the treaty benefit are claimed, and, if applicable, meets the requirements of the treaty provision dealing with limitations on benefits."

    If I tick this box, it allows 8 options two which seem like they might apply to me, but I'm not sure if they do. These options are:

    - Company that meets the ownership and base erosion test- Company with an item of income that meets active trade or business test

    I am not clear what these things are. The rest don't seem to apply.

    So how do I fill this form properly?

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

    A script in android studio that wipes data from emulator?

    Posted: 17 Nov 2021 01:44 AM PST

    How can I implement a script that does the following:

    1. close/shutdown the emulator
    2. wipe its data from the AVD manager
    3. Turns on the emulator and runs the application

    (Bound to an alias to use my keyboard)

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

    Is it possible to distribute on Google Play with an unlisted URL?

    Posted: 16 Nov 2021 07:42 PM PST

    Basically, we're trying to copy iOS. On iOS it's pretty nice because our team uses TestFlight. Which means people are invited once, and they get updates and everything.

    What I want from Google play is "internal releases" I think, but I want users to be able to install updates. Is this possible?

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

    Multiple camera previews from same camera x not working as intended

    Posted: 16 Nov 2021 10:58 PM PST

    Multiple camera previews from same camera x not working as intended

    I've been trying to make a camera preview using CameraX on android studio, and I managed to get two instances of the preview loaded. However, when I run it, the camera previews show different parts of the same camera view; I want sort of a cropped version of the camera view, but in both previews. I'll put a picture to describe it, and just the xml code.

    https://preview.redd.it/rgxjfjzct3081.png?width=385&format=png&auto=webp&s=957c3c68d56eb26e2546f44993fbbbfe570f8ee0

    https://preview.redd.it/9gydmkk5t3081.png?width=1304&format=png&auto=webp&s=0c11abe72474e4ac895e3b51bd5b2cab6bf1bd9e

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

    Autofill framework not working in google chrome

    Posted: 16 Nov 2021 02:05 PM PST

    Hi guys,

    I created autofill service by github sample that is working very well. I practically just copied it, but mine doesnt work in google chrome. When I press on text view onFillRequest isnt call at all. But when I turn on the github sample autofill and then change autofill to mine. It is working. But when I use just my autofill it doesnt work like I said in google chrome.

    Do you have any suggestion where could be something wrong?

    my main file: https://github.com/sleaper/react-native-autofill/blob/accessibility-service/android/app/src/main/java/com/testmodule/MyAutofillService.java

    github sample: https://github.com/android/input-samples/blob/main/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/simple/DebugService.java

    Iam stuck on this for few days and Iam starting to be pretty helpless.

    If you have any question feel free to ask.

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

    No comments:

    Post a Comment