• Breaking News

    [Android][timeline][#f39c12]

    Sunday, January 24, 2021

    I just spent 3 hours trying to repair my app and it turns out emulator wasn't working properly. Android Dev

    I just spent 3 hours trying to repair my app and it turns out emulator wasn't working properly. Android Dev


    I just spent 3 hours trying to repair my app and it turns out emulator wasn't working properly.

    Posted: 24 Jan 2021 09:17 AM PST

    onOptionsItemSelected wasn't called in my app. I tried everything to fix it without any luck. Finally in despair I hooked my phone to pc and launched app. It worked 100%. Instead of doing something productive I just lost 3 hours trying to fix app that wasn't broken. I feel sad

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

    A new open-source project for developing applications without handling complex data issues

    Posted: 24 Jan 2021 03:40 PM PST

    As I am currently releasing an open-source DB which is client first on Android, I would like to animate a discussion here about the development of applications with specific features, I think about:

    • Offline first, like your todo list
    • Live multi-device synchronization, like WhatsApp you can use on your phone and your browser
    • Multiple user collaboration with versioning: just like google doc
    • End-to-end encryption: like WhatsApp again

    So did you already came across the challenge of getting the features listed above in your app? Was it a hassle or did if you find easy solutions to implement them? - I have a small experience of existing solutions, and I will be happy to deep dive into your references.

    On my side, I am publishing with an open-source license a new kind of database. Basically, you just use it as a normal DB, by writing values on attributes and it manages all the properties I listed above. It's based on an immutable structure but the developer doesn't really need to care about that, it's totally automatized from his entries. We did a POC in this messenger app, which is offline-first, end-to-end secured, and collaborative.

    ⭐You can discover the database open-source project here.

    I and the main author of Condensation are here to answer your questions concerning the project.

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

    Help .. Lost password for signing app

    Posted: 24 Jan 2021 03:44 AM PST

    Hello, I just took over an app which was built by a contractor and was released by him. This doest NOT use playstore signing. Now I am trying to release an update. I got the Keystore file from him. But he doesnt remember the password. So not able to sign the new release of the app and upload to Play store. Anyway to solve this? I came across this form for requesting Google to reset the key https://support.google.com/googleplay/android-developer/contact/key

    But there is an option which says that "Upload key misplaced". I just wanted to understand that the signing key and upload keys are different?

    Please help

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

    Jetpack Compose: on handling config changes and getting rid of Fragments and ViewModels

    Posted: 24 Jan 2021 09:56 AM PST

    I've written two articles about how, with compose, we can overcome some of the biggest pain points of Android development.

    I describe the pain points, explain why compose can help, and how to do it.

    I hope you enjoy them, and please share your thoughts!

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

    BottomNavigationView And Navigation Component Bug

    Posted: 24 Jan 2021 03:03 PM PST

    Fragments' states are not preserved and they are always added on top of the last one when you try to navigate using the bottom navigation view. Therefore, keep in mind that you should use workarounds like these:

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

    Why is my Relativelayout broken on fragments?

    Posted: 24 Jan 2021 03:19 PM PST

    I have created a bottom navigation bar from this tutorial https://www.youtube.com/watch?v=JS3DIb4x1JQ&t=1352s, but RelativeLayout doesn't work properly on fragments. Here is the code of bluetooth fragment with textview in the middle:

    <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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"> <TextView android:id="@+id/bluetooth" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#0472FE" android:text="Bluetooth" android:textSize="30dp" android:layout_centerInParent="true" /> </RelativeLayout> 

    Java class for bluetooth fragment:

    package com.example.nesto; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; public class BluetoothFragment extends Fragment { @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_bluetooth,container,false); } } 

    This is what it looks like in design

    And this is what it looks like in android emulator

    How do I fix it?

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

    Laptop specs for Android Studio

    Posted: 24 Jan 2021 03:10 PM PST

    My current computer is four years old and used to run Android Studio ok, but now it's always slow and sometimes unusable. Specs are: i7 - 7500, 16GB RAM, and a hard drive. A replacement I'm looking at has an i7 - 10750H, 16GB RAM, and a choice between an SSD with 32GB Optane or an NVMe M.2 SSD. Should this be a significant improvement or should I try for something better? Thanks.

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

    AVD crashes the whole computer on launch

    Posted: 24 Jan 2021 09:09 AM PST

    Whenever I try to start an AVD Emulator on my computer it starts to do something then my whole system crashes. I've tried devices up to API 30 down to API 27 on pixel 2. I'm using the Android R x86_64 image.

    PC Specs:
    Intel i5-6600k 3.5 GHz Quad-Core
    Asus Z170-A ATX LGA1151 Motherboard
    16 GB DDR4-2133 CL14 RAM
    MSI GeForce GTX 1070 8 GB Gaming X Graphics Card

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

    Architecture Question MVVM + DataBinding

    Posted: 24 Jan 2021 02:44 PM PST

    Just finished reading this RayWenderlich article that goes over Android MVVM and how it compares to other arch patterns.
    One thing that sticks out to me about this article and DataBinding in general is how the examples will usually show the views being directly hooked up to data models, often accessing properties on the models themselves. The first part of the article talks about how the view layer should only be dependent on the ViewModel layer, but if the views are bound to model properties directly, doesn't that mean that the view now depends on the ViewModel (who holds the LiveData<Model>) AND the Model itself?

    The article example looks like this: xml <layout xmlns:android="http://schemas.android.com/apk/res/android"> <data> <variable name="user" type="com.example.User"/> </data> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{user.firstName}" android:id="@+id/firstName"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{user.lastName}" android:id="@+id/lastName"/> </LinearLayout> </layout> </xml>

    And as you can see, what looks to be a Model layer class User is referenced in a View layer component. Shouldn't it look more like this?

    xml <layout xmlns:android="http://schemas.android.com/apk/res/android"> <data> <variable name="uiModel" type="com.example.UiModel"/> </data> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{uiModel.userFirstName}" android:id="@+id/firstName"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{uiModel.userLastName}" android:id="@+id/lastName"/> </LinearLayout> </layout> </xml>

    This way the ViewModel can expose the things that the View needs via the UiModel (which would be a ViewModel layer class), without the view actually knowing the structure of the data/model layer.

    Any insights are greatly appreciated.

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

    RxJava is better than kotlin coroutines?

    Posted: 24 Jan 2021 01:40 PM PST

    I browse job offers and in requirements is mostly rxJava than kotlin coroutines, nonetheless kotlin is more common, coroutines are cleaner and concise, why developers still use rx? is it worth learning rx?

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

    Modules, Interface and choosing between multiple implementations

    Posted: 24 Jan 2021 12:57 PM PST

    So I've successfully avoided gradle modules until now, but I really think I need to learn how to use them. Googling hasn't gotten me very far, so I'm curious what people here have to say.

    My problem: I want to integrate Google Play Billing, but also want to offer a Google-free version on F-droid. I imagine it like this: A wrapper interface around the billing logic, and a Google Play Billing implementation of that interface as well as a Google-free one. Then with some kind of build flag (flavors?) I can decide which one is used to build.

    Ideally this would work so the Google-dependent implementation never appears when building the open source version, so I think the modules would have to be dependencies that are only applied if the right build flag is set. I don't know whether that's possible though (I could also maintain two branches if it's not).

    How would you solve this? I would have thought that this is a pretty frequent scenario, but I can't find anything explaining how to do this in detail. I don't use Dagger by the way.

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

    Does this make sense? Kotlin for frontend, Kotlin + R + SQLite for backend.

    Posted: 24 Jan 2021 11:43 AM PST

    Hey everyone,

    I'm creating an app with a friend, and we're currently making the big choices up front. What does the collective wisdom of r/androiddev have to offer?

    - We want to create a data driven app for a specific niche that gives users a report once a week as a reward for entering their data. It also rewards them with new reports at certain stages of their app usage.

    - The idea for the backend is to set up a home server that calculates these reports adhoc. So a user will send a few data points to the server through the app, which is then added to a sequential list of tasks. The order in which these tasks are received from each user doesn't matter hugely, so long as the server receives the data eventually (i.e. within a day).

    - The list of tasks is run in sequence regularly - i.e. adding rows to the SQLite database, running queries from the SQLite database, and creating R Markdown reports in the R programming language based on the queried data. These reports are then sent to a web server that hosts our app website, which will house all of the reports for all users. They can only access them with username/password.

    - In theory, the SQLite queries/updates can be run in parallel with the R Markdown report creation. However, SQLite only allows one user to access the database at a time, hence the sequential access. We are assuming that the number of app users would, at least initially, be low enough that this would not be a problem. We can always scale up later.

    - The reports are sent to the user once a week (or thereabouts), and they receive a notification for these. They can then view them through a WebView activity in the app.

    Does this make logical sense? Is there a smarter way to do this? The reason we want to use R is because R is our primary language, we want to iterate quickly, and we think it has the best plotting/statistical tools for the data we have in mind. Also, R Markdown reports are fantastic, and far simpler than getting Java graphs to work well in Android. Or am I mistaken?

    Thanks very much!

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

    Python -.py to APK?

    Posted: 24 Jan 2021 07:37 AM PST

    So I'm new to python and i got into a really interesting project all python based

    I'm using old phones as sensors and wifi extenders and more other stuff

    all working with a python script i wrote the first phone acts as a sensor and it sends a true or false value to the other phone through a telegram bot

    if the value is true it will make a wifi bridge connection to extend my wifi it will be useful if your router doesn't cover the whole home

    anyway my project is done and it's all working good but i want to export it as apk and have all the processes automated

    Right now I'm running scripts on termux with python3.8 installed and adb

    let's say i want share this project with a friend of mine he have to install termux and install python on it then install dependings from pip then setup adb to connect from local host then run the script.

    MY question is : Is it possible to maybe compile the .py file to apk and run it directly? Like on windows you can compile .py files to exe and run it without python installed is that possible on Android?

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

    17 — 23 January Android Newsletter

    Posted: 24 Jan 2021 03:16 AM PST

    Stay up to date with Android development, in this week's edition:
    🐌 Migrate JUnit 4 tests to JUnit 5
    📍 Find out new guidelines for background location
    🕵️ Master the Reflection API
    📱 Build your own device lab
    and much more!

    Read it here 👉 https://vladsonkin.com/android-newsletter-30/

    💥Featuring @adekk @prafullmishra09 @manuelvicnt @dreipol @Zhuinden and many more devs!

    💚 Subscribe and receive new editions directly to your email. Weekly, no spam, unsub anytime.
    Here is an example: https://mailchi.mp/33c57a5230cb/android-newsletter-30

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

    Next step to avoid backing properties for StateFlow

    Posted: 24 Jan 2021 12:25 AM PST

    Need help getting started

    Posted: 24 Jan 2021 08:26 AM PST

    Hello!

    I want to make an app that can add custom toggles to notification shade which execute an adb shell command when clicked. However, I have no prior experience writing Android apps. Is there a place where I can get started that can help me? Thanks!

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

    How do you make your own Android OS

    Posted: 24 Jan 2021 07:12 AM PST

    Hello! I recently learned that you could make your own version of the Android OS. I wanted to know what coding language it uses and how to get the source code.

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

    How to fix the error: null is not an object (evaluation of 'bleManager.start')?

    Posted: 24 Jan 2021 07:12 AM PST

    I use the react-native-ble-manager library to connect an Android smartphone to a BLE device. But when calling the BleManager.start() , an error immediately occurred, I already looked at Issues on GitHub, the solutions that are there did not help me in solving this problem. My steps in installing lib:

    1. npm i --save react-native-ble-manager

    // file: android/app/src/main/AndroidManifest.xml ... <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> ... 

    I've tried using ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION, both together and separately.

    1. npm i

    2. In README.md it is written that there is support autolink, but it will not be superfluous: react-native link && react-native link react-native-ble-manager

    I don't use Expo. When running the example from the library, the same error occurs. I use only this in my project (not example):

    ... import BleManager from 'react-native-ble-manager'; ... const scanAndConnect = () => { BleManager.start() .catch((err) => { console.error(err); }); }; ... 

    build.gradle info:

    buildToolsVersion = "29.0.2" minSdkVersion = 16 compileSdkVersion = 29 targetSdkVersion = 29 

    OS: Android 9.0

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

    For a social heavy app, React Native or Ionic with Cordova or Capacitor (or not…)?

    Posted: 24 Jan 2021 03:06 AM PST

    Hello guys. I'm starting a project that will be very reliant on social interactions. Having already published a few Ionic apps, and always struggled with all that's social login, sharing etc… I was wondering what do you think about it nowadays?

    My app will need as much as possible social logins, sharing, and friends import.

    So, do you think an hybrid Ionic app is still a good fit for something like this? Is React Native better on that aspect? Or do I have no choice but to go native...

    Thanks ahead!

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

    Using LiveData with TextView

    Posted: 24 Jan 2021 01:00 AM PST

    Hi peeps, not sure if this is something allowed, if not then remove it...

    I'm using Android Room (to which I'm very new to) and I'm trying to use the following:

    @Query("SELECT COUNT(*) FROM table_projects") LiveData<Integer> getDatabaseCount();

    I'm also using a TextView to initially display 0 and I then want it to show the database size.

    However, I'm unsure how I actually use LiveData. When I try to use getDatabaseCount().getValue() it returns null which is expected.

    I've seen online that I need to use a ViewModel to observe the LiveData and then update the TextView once it's been updated, however, I cannot for the life of me find out how this is done.

    Once I understand how to use it with a TextView, I can apply it to other things in my app but I'm really struggling

    Cheers guys

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

    Android Emulator support for AMD CPU

    Posted: 23 Jan 2021 08:16 PM PST

    Guys, I am considering buying an amd powered laptop, but I am concerned the android emulator support for AMD CPU

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

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel