• Breaking News

    Tuesday, April 21, 2020

    Android Dev - What are we supposed to use instead of AsyncTask ?

    Android Dev - What are we supposed to use instead of AsyncTask ?


    What are we supposed to use instead of AsyncTask ?

    Posted: 20 Apr 2020 10:37 PM PDT

    The documentation for AsynchTask is crystal clear:

    This class was deprecated in API level R.
    Use the standard java.util.concurrent or Kotlin concurrency utilities instead.

    However in other articles in the documentation on processes and threading such as here and here we are still referred to AsynchTask. What is the recommended way to do some processing in the background telling the UI thread to update every now and then?

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

    Will anyone be interested to use a Open API that emulates some of the functionality of some social media app to create app for learning?

    Posted: 20 Apr 2020 09:20 PM PDT

    I am thinking to create an API that emulates FB or Instagrams basic feature so mobile or frontend devs can use that API to learn about JWT auth flows and create practice apps to add into their portofolio. Once I am done with the basic functionality I would not mind if someone wanna pitch in their time help me maintain it.

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

    An app to monitor chest movements to detect sleep apnea. Need some help guys please

    Posted: 21 Apr 2020 06:53 AM PDT

    hi,

    I've seen those belts that you put around your chest during the night that measures chest movements to detect sleep apnea. Basically they are built around piezo sensors. They are expensive ($300) and I was wondering if we can build a cheap one.

    I came up with this idea :

    Since phones have built-in movement sensors I thought we could take profit of them. So I imagine a phone strapped around the chest, with an app recording every movement (via sensor detections). Then we can analyse the data and see if during the night there is no movement during several seconds, meaning sleep apnea.

    Do you think it's feasible?

    Is there an app that records the sensor movements detection during several hours?

    Thanks for your help, I'm sure this could serve many people with bad sleep.

    Take care

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

    What should I learn to be an android developer?

    Posted: 21 Apr 2020 08:52 AM PDT

    Like I said in the title, What should I learn to be an android developer? I'm doing android development for hobby. But lets say I wanna make thing serious. What technologies should I learn?

    I'm currently coding an app. I use activities for nearly everything. Because life cycle management of activities is so much easier to handle than fragments. I used fragment before but app leaked memory everywhere so I stopped using it.

    I pay attention to not leak memory.

    My Views and my app logic are mixed. I retrieve data from server inside activity.

    Sometimes I read other developers storied or blog posts. They talk about MVVM, Dagger or some other cool stuff.

    I don't know any of that. If I need something, I search a GitHub library and 99 percent of time there is a GitHub library for what I need. I don't feel like I'm a real developer.

    What things should I learn?

    submitted by /u/50KurusVerLanTirrek
    [link] [comments]

    Facing problem with storing Json data into an ArrayList?

    Posted: 21 Apr 2020 08:42 AM PDT

    Here is the code

    class fetchedJson(private val listVal: ArrayList<String>?): ArrayList<String>() {

    fun fetchResult(): ArrayList<String>? {

    val url = "https://api.thevirustracker.com/free-api?countryTotals=ALL"
    val requests = Request.Builder().url(url).build()
    val client = OkHttpClient()

    client.newCall(requests).enqueue(object : Callback {
    override fun onFailure(call: Call, e: IOException) {
    }

    override fun onResponse(call: Call, response: Response) {

    val body = response.body?.string()

    val gson = Gson()
    val parsed: Map<String, List<Map<String, Any>>> =
    gson.fromJson(body, (object : TypeToken<Map<String, List<Map<String, Any>>>>(){}).type)
    for (i in 1..100){
    val parsedvalue: Map<Any, Any> = parsed["countryitems"]?.get(0)?.get(i.toString()) as Map<Any, Any>
    val countryName = parsedvalue["title"].toString()

    listVal?.add(countryName)}}})
    return listVal
    }
    }

    problem is on calling this function, in mainActivity, and storing the arraylist into dataStore variable,

    val application = ArrayList<String>()
    val dataStore: ArrayList<String>? = fetchedJson(application).fetchResult()

    Now when I use debugger and check the datastore varibale it return null value but however when I move the debugger to next line and then back to previous line it returns with expected data stored into the variable. Can anyone help me out with this.

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

    LiveData Coroutine Builder

    Posted: 21 Apr 2020 08:42 AM PDT

    HELP REQUEST: Failed to mount /efs (invalid argument) TWRP - Samsung S9+

    Posted: 21 Apr 2020 08:20 AM PDT

    Hello there! Due to this issue, I can't boot up into the Custom ROM properly. It's stuck at an infinite Boot Animation, and I am certain that the EFS is the problem. I've checked the option Mount on TWRP, and it says that my EFS is at (0MB). What am I supposed to do?

    Help would be much appreciated!

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

    Build an Android Application with Authentication

    Posted: 21 Apr 2020 08:15 AM PDT

    The New Features in Android Studio 4.0 Beta

    Posted: 21 Apr 2020 08:09 AM PDT

    Did anyone record the Advanced Bluetooth webinar at Droidcon Italy this morning?

    Posted: 21 Apr 2020 07:56 AM PDT

    It was at 5am for me and I slept through my alarm :(

    If anyone has the video they could share with me I would very much appreciate that, I can't find it anywhere

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

    Is it possible to modify the APK manifest of apps, to add support for a hardware mouse to the application.

    Posted: 21 Apr 2020 07:41 AM PDT

    Car Android autostart scripts

    Posted: 21 Apr 2020 07:36 AM PDT

    Not sure if it is right place to ask, but haven't found a community for Android hacking.I have chinese car head unit, I was able to install firmware from another chinese head unit and root it.

    I'm not familiar with android boot process and event system, but is it possible to autostart WiFi hotspot (tethering) on boot?

    Is it possible to start USB tethering on adb device connection?

    The problem is that firmware of the head unit is missing USB tethering at the Settings UI, but has WiFi tethering.

    Wifi tethering works ok, but I need to autostart it.USB tethering is missing, but I was able to turn on RNDIS using "Settings" > "Developers option" and I have seen USB ethernet at the connected Linux laptop.I think just need to start a daemon for USB to assign IP addresses and route it throw current internet connection.

    Full connection scheme is:

    USB LTE modem is connected to Android

    Few wifi clients are connected to Android and getting the internet from USB LTE modem

    + I need to connect laptop to Android to have internet using an other USB port of Android head unit

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

    Student confused by choices, what to learn and use?

    Posted: 21 Apr 2020 07:29 AM PDT

    I am a student who looks to learn android development. I have basic programming knowledge with Python and C++. Currently, I have very confused about what to use to develop the app. Currently, I am choosing between Android Native (Java/Kotlin), React Native, Flutter and even Quasar.

    I know there are many resources out that talks in depth about all of them, however, I spent hours looking to choose one but was unable. I am at the point of information overload. I know using native Java/Kotlin is perhaps the best choice but AndroidStudio does not run smoothly on my computer.

    There is also an android app development competition where I can submit an app, I wish to join that but is it even possible to make one by the end of May?

    Any pointers will be greatly appreciated.

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

    Replacing Custom Views with View Binding

    Posted: 21 Apr 2020 07:02 AM PDT

    Kotlin Discord Server, because why not?

    Posted: 21 Apr 2020 06:26 AM PDT

    Best native Android Development learning resource

    Posted: 21 Apr 2020 02:34 AM PDT

    Here we go again. I messed with android studio, java and kotlin before. But soon I got to the point where it just wasn't fun anymore. I have a bit of knowledge and experience in many fields all from web dev, to game dev... Recently I've been messing around with Flutter, but honestly, I don't see future with it. There zero job opportunities in my country with flutter.. So I would like to once more give chance to native Android dev. I've seen jetpack compose, and as I always struggled with making UI in Android Studio and all the constraints and making everything look good on all screen sizes, I think Compose would make difference in that field? To cut the story short, I'm interested in some Udemy course which covers everything and is up to date with the new stuff. Of course I searched myself, but they all look kinda outdated to me. So I need recommendations. Also is Kotlin the right way to go these days? I think most of the companies still use Java? Anyway recommend something you know for sure is good, and it possibly helped you.

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

    JetNews, a small open-source Jetpack(AndroidX) news app

    Posted: 21 Apr 2020 02:15 AM PDT

    When quarantine takes away your sleep, might as well make something.

    It's basically the AndroidX news site in the bottom navigation view.

    Why did I make it?CBA to open the web, if you're like me you've come to the right place, plus you might learn a thing or two.

    Github

    Edit: this isn't a compose app nor anyhow related to https://github.com/android/compose-samples/tree/master/JetNews

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

    Button Image Tint change possible?

    Posted: 21 Apr 2020 05:52 AM PDT

    Greetings,

    Im working on an Android app. I have a Button that is just using a black vector SVG image on line android:drawableTop="@drawable/main_report". It is colored by a tint in the XML layout.

     <Button android:id="@+id/buttonstage6" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/transparent" android:drawableTop="@drawable/main_report" android:drawableTint="#3F51B5" > 

    Im trying to use the OnClick listener event to change the drawableTint value to something like red (#FF0000) from within the MainActivity java file.

    I cant figure out how to do this and I've tried and not been able to get it to work. I think I read that once certain values are defined in the XML that it becomes non-changeable. Is that the case? If not, how should I implement?

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

    Problem with loading text from assets file (Problem with reading text files from assets folder (Unmarshaling error, Parcelable class)

    Posted: 21 Apr 2020 05:05 AM PDT

    I developed my first android app, so i will describe it and the problem briefly...

    It's a song book app. The app reads lines from text file that contains numbers and tile of the song then puts that data to an ArrayList
    that is used to set up the RecyclerView
    . When the certain item is clicked it checks for the song number that is in array list item and then based on that opens and reads text from a file that is named for example 23.txt
    . I have three languages (menu items) that can be checked in navigation menu, they have click listeners that change the current list for the RecyclerView.
    The problem is that when the third language (menu item) is checked whatever the first item is in the RecyclerView it throws an exception that the file doesn't exist (while it exists in the assets folder, and works for all other items in the list) and occasionally it says (on Samsung Galaxy A8):

    i have shared my code here https://answiz.com/questions/90319/problem-with-loading-text-from-assets-file-problem-with-reading-text-files-from-assets-folder-unmarshaling-error-parcelable-class

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

    Question: How to remove / customise top row of 'share with' contacts (blurred on the picture). Android 10, Pixel 2 XL. Don't want the contacts who are always appearing there.

    Posted: 21 Apr 2020 04:58 AM PDT

    Google Play Developer Subscription Age Policy Question

    Posted: 21 Apr 2020 04:33 AM PDT

    I know, and I'm sure that many know, that Google Play has a policy where you must be at least 18 years of age to have a developer account. I'm 13, and i would want to post on Google Play in the future, so would it be ok if i had an account but my dad controls everything when it comes to payment and receiving money, as in, I have an account, but we buy the Developer options for the account through his card, and if i were to make some kind of income it would be received on his card, would that be ok with Google Play, or would we have to post everything on his account, as in I make a game, but he buys developer options for his account, instead of mine, and then if I were to make a game, we would have to post it on his account and in general do everything on his account? My dad told me that he would be happy to help me, and that we could simply just do everything on his account, but i would prefer if we could do it on mine cause i would have a little bit more accessibility and could modify my account, as in for example, if i would want to change my picture for my account, more easily.

    TL;DR I'm 13 and would want to upload games on Google Play, so could my dad and i manage to do everything on my account, or would we have to do it on his, and not interfere with Google Play's policy?

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

    Does income really depend that much on the logic of ad display and network performance? Let's learn the ultimate guide on essential in-app advertising metrics!

    Posted: 21 Apr 2020 03:32 AM PDT

    problem with admob mediation

    Posted: 21 Apr 2020 03:06 AM PDT

    hi idk if this is normal or not

    but when i add admob mediation to my app admob ads stop appearing while banner ads work normally but interistitial take a long time to load and doesn't show the same number of ads as before while facebook interstitial doesn't show at all even in test mode ,and when i delete networks groupe from admob everything works and fill rate back to normal is there anything wrong ,

    EDIT: i didn't publish the app so idk if this can be happen to my app's users

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

    Valid, "readytogo" Tools for mobile app building (not only builders), without have to code too much ?

    Posted: 21 Apr 2020 02:44 AM PDT

    Hi! As for website we have a ton of builders to make our own project without having to write a line of code sometimes. What about for apps? Do we have builders or readymadetools that can speed up the process of making an app, an app prototype, or something rough that we will edit and make a MVP to present to the developers team or even if the team is not needed for the purposd, a finished app? Write your favourite or the best you like to use, but also what you heard of :)

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

    No comments:

    Post a Comment