• Breaking News

    [Android][timeline][#f39c12]

    Sunday, July 11, 2021

    Path Finding Visualizer App using Jetpack Compose Android Dev

    Path Finding Visualizer App using Jetpack Compose Android Dev


    Path Finding Visualizer App using Jetpack Compose

    Posted: 11 Jul 2021 07:17 AM PDT

    Path Finding Visualizer App using Jetpack Compose

    Path Finding Visualizer App using Jetpack Compose in Android.
    I used Dijkstra's algorithm for finding the guaranteed shortest path.
    I also had fun managing the state and animation using Kotlin coroutines.

    Source code:
    https://github.com/crjacinro/compose-path-finding

    This pet project is inspired by Clement Mihailescu's Pathfinding Visualizer project (https://github.com/clementmihailescu/Pathfinding-Visualizer)

    https://reddit.com/link/oi58sz/video/iksxymyzdla71/player

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

    How long will you go to protect your Android app from being tampered?

    Posted: 11 Jul 2021 07:34 AM PDT

    I'm having issue submitting an app for Android Auto.

    Posted: 11 Jul 2021 03:59 AM PDT

    I followed the official docs to create Android Auto app, but I'm getting rejected with this message:

    At this time, we are only accepting apps within the Media, short form Messaging, or categories supported by the Android for Cars App Library. Media apps that use TSS engine readout for content are not permitted at this time.

    It happens on internal track, which shouldn't be reviewed at all, so I'm confused even more.

    "Categories supported by the Android for Cars App Library" are, as I read:

    • androidx.car.app.category.NAVIGATION
    • androidx.car.app.category.PARKING
    • androidx.car.app.category.CHARGING

    This is what I added in the manifest

    <service android:name=".service.CarService" android:exported="true" android:label="@string/app_name" android:icon="@drawable/ic_logo"> <intent-filter> <action android:name="com.google.android.car.action.CAR_APP"/> <category android:name="androidx.car.app.category.NAVIGATION"/> </intent-filter> </service> <meta-data android:name="com.google.android.gms.car.application" android:resource="@xml/automotive_app_desc"/> 

    automotive_app_desc.xml looks like this:

    <?xml version="1.0" encoding="utf-8"?> <automotiveApp> <uses name="template" /> </automotiveApp> 

    Frankly, I tried different variations and tried submitting anything that resulted in my app actually working in my testing using desktop head unit.

    Any help with this is appreciated, I will try anything :)

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

    Shopify screenshot testing

    Posted: 11 Jul 2021 09:48 AM PDT

    95 of 100 subscription orders from Indonesia stuck in payment pending after free trial ended. Is it normal?

    Posted: 11 Jul 2021 07:37 AM PDT

    The payment pending or decline rate in global is more than 80%. The mainly purchased item costs less than $20/year. Although the developing countries have a higher decline rate than developed countries, the decline rate is too high to ignore. Have you encountered this issue? What is your app's decline rate in specific countries?

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

    How can I mock dependencies in my activities for tests?

    Posted: 11 Jul 2021 11:41 AM PDT

    So I've got an android app that I have put together using Dagger. I am in the process of writing integration tests with espresso and the test support library. I'm new to Android development in general, but I'm an experienced web dev.

    My main goal is to mock the SQLite-related classes so I can control the data in my otherwise full integration tests. All those classes come from dagger. I would think that maybe I can build a dagger component in my test and provide mocks to it, but I'm really not sure.

    Advice is appreciated.

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

    New to android devv and curious about legal stuff

    Posted: 11 Jul 2021 03:26 PM PDT

    So I'm working on an app rn and need to use some graphs and data from website, are there any legal issues with displaying this on my app ?

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

    Anyone who can take in a mentee?

    Posted: 11 Jul 2021 12:01 PM PDT

    I've been developing android apps for about 6 months now. I've just finished my graduation. I am not looking for jobs. But I want to develop my own applications and make a living of it. I've learnt a lot of technologies in android. But I need some guidance for the path I'm choosing.

    If anyone can become my Mentor, I'll be eternally grateful. Anyone who is making a living by making their own apps or by start-up agency for app development. I'm not looking for anything big. I want just want to learn.

    I like to think that I'm a sincere guy. And promise it won't be a bad experience. I'll also try to be helpful to you, if you(the mentor) need anything.

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

    Best practice to organize user preferences/settings?

    Posted: 11 Jul 2021 11:56 AM PDT

    I didn't find much information about this on the internet. I think this could be applied to any software (mobile apps, games, desktop software…) development.

    So, say we make a new app with initially 1 preference: - Preference for "theme": lets the user change between "light" and "dark" themes.

    Assume it is stored in SharedPreferences (maybe it could also be applied to databases or plain text files). So we could store it by these ways:

    0) We decide to save it as a boolean:

    • key: <"theme_is_light">, current value: ["true"]

    Pros I see: Quick to implement, few lines of code. Best performance(?).

    Cons I see: If you were to add more themes (blue theme, gray theme...), then..oops. You can't:

    • Would need to migrate "theme_is_light" boolean to another type of value (string, int or long), since booleans only allow two values.

    So I thought about the other options.

    1) Store <preference name> as key, [item name] as value. Like this:

    • key: <"theme">, current value: ["light"]

    Pros I see: If in the future you were to add more themes, it's just as easy as adding a new value (e.g. "blue", "grey"...).

    Cons I see: If you decide to delete a theme value (e.g. you delete "light"), then you'd need to keep track of old removed values to avoid unexpected behaviours when users update from old versions.

    2) Store <incrementing int/long number> as key, [item name] as value. Almost like databases do:

    • key: <"0"> (previously "theme"), current value: ["light"]

    Pros I see: Now we don't have to worry about previously used keys.

    Cons I see: Values have the same problem as before, need to keep track of old unused values to avoid potential conflicts between versions.

    3) Store <incrementing int/long number> as both key and value:

    • key: <"0"> (previously "theme"), current value: ["0"] (previously "light")

    Pros I see: Looks very flexible.

    • Want to add a new theme? Just add a new number.

    • Want to replace a theme? Remove code for old theme value and replace it by using the same number or even use a new number.

    • Want to delete a preference? Just remove the code using that number.

    • No need to keep track of which old preference names were used or deleted, you know it just by looking which numbers are being used.

    • No need for migration code that you'll need to carry for the rest of your existence.

    In fact we could have every single preference key as a number and separate the key numbers by value type (i.e. separate strings, longs, ints...). This way, we could reuse them if desired or just add a new one (for example, you probably wouldn't want to reuse a String preference that saves text typed by the user).

    So longs/ints/booleans could use numbers as keys and values, while Strings/JsonArrays/etc would use numbers only as keys.

    In case we wanted reusing, we'd need to make sure previous and new key are the same type, but I see it totally possible.

    Code handler could look like this:

    class PreferenceManager { // "Hard-coded" key numbers // We could use an Enum/IntDef here final static PREF_KEY_THEME = 0; // …more pref_keys here // "Hard-coded" value numbers final static PREF_VALUE_THEME_LIGHT = 0; final static PREF_VALUE_THEME_DARK = 1; // …more pref_values here public void handlePreference(String preference_key, int preference_value) { //SharedPreference keys are Strings, so we need to convert it to Integer int key = Integer.parse(preference_key); switch(key) { case PREF_KEY_THEME: switch(preference_value) { case PREF_VALUE_THEME_LIGHT: changeThemeToLight(); case PREF_VALUE_THEME_DARK: changeThemeToDark(); } case …: … default: Log.e("MyTag", "Preference key doesn't exist, do nothing."); } } } 

    Cons I see: Maybe not the best performance(?)

    • Requires more code. Need to declare more variables.

    • Harder to read preferences file. You open it and all you see is numbers, you depend on the code to be able to tell what the preferences do. Maybe not a problem, since the code would be legible.

    So is the 3rd approach good? Is it viable? Is there a better way?

    What do you think?

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

    i don't knows what playstore mean by this message

    Posted: 11 Jul 2021 02:08 AM PDT

    Depends on menu Your app depends on having a "Start," "Select," or "Menu" button to reach the menu. Android TV controllers do not support a "Select," "Start," or "Menu" button. Please refer to our Gamepad Button Presses documentation for details: http://developer.android.com/training/game-controllers/controller-input.html#buttonProcess

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

    Integratable piece of code for apps

    Posted: 11 Jul 2021 03:10 AM PDT

    Hey guys,

    I come from web dev and have almost no experience with android dev.
    I want to create a small window with some functionality (should be able to communicate with an API) in it, which can be added by other programmers to their android apps.
    I am not sure where to start because there are so many ways to create apps.
    I tried hard to do my research prior to writing this but I don't even know how to search for it on google.
    So i would be thankful for any advice, resources or just keywords for google searches that you guys can give me. Thank you very much in advance <3 :)

    submitted by /u/Affectionate-Cod312
    [link] [comments]

    Unable to build project (Android Studio Canary)

    Posted: 11 Jul 2021 01:14 AM PDT

    Dagger hilt - rid of it completely

    Posted: 10 Jul 2021 05:27 PM PDT

    1. In production apps, what do you commonly inject? View model? What else? I don't care about singleton, cuz I can easily create a singleton without dagger.

    2. If viewmodel is only thing you inject most, does it make any sense to make your app much more complicated with dagger?

    3. I don't need injection in singleton with dagger since you inject it once and be done with it.

    4. With jet pack compose, it's even more so I should not use dagger at all.

    5. For testing, I could just use mocks

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

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel