• Breaking News

    Thursday, April 9, 2020

    Android Dev - COVID-19: Downloads Of Health & Fitness Apps Increased By 40%

    Android Dev - COVID-19: Downloads Of Health & Fitness Apps Increased By 40%


    COVID-19: Downloads Of Health & Fitness Apps Increased By 40%

    Posted: 09 Apr 2020 01:49 AM PDT

    20 Essential Android Studio Plugins

    Posted: 09 Apr 2020 08:29 AM PDT

    Mouseless coding in IntelliJ with Hadi Hariri

    Posted: 09 Apr 2020 07:55 AM PDT

    For those who didn't watch, a very nice tutorial about shortcuts in Android Studio.

    https://www.youtube.com/watch?v=UH6YVv9js3s

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

    RelativeTime: a library that lets you define the language of relative time, e.g. "5 hours ago" or "1 month from now" and so on

    Posted: 08 Apr 2020 01:48 PM PDT

    D8, R8 and enums - Kotlin Vocabulary

    Posted: 09 Apr 2020 04:01 AM PDT

    Error populating relational table with SQLite

    Posted: 09 Apr 2020 05:46 AM PDT

    I'm trying to populate an SQL table but I keep running into errors. I have a cocktails table and an Ingredients table which are set up fine and have data in them. I've also created a cocktailIngredients table which is showing in DB Browswer fine. I'm then trying to populate this table with the cocktail ID and the ingredient ID from the two other tables with the following code:

    Cursor c = db.rawQuery("SELECT cocktailName FROM " + CocktailsTable.TABLE_NAME, null); if(c != null){ if(c.moveToFirst()){ do{ ContentValues cv = new ContentValues(); cv.put(CocktailIngredientTable.COLUMN_COCKTAIL_ID, c.getString(c.getColumnIndex(CocktailsTable._ID))); db.insert(CocktailIngredientTable.TABLE_NAME, null, cv); } while (c.moveToNext()); } c.close(); 

    I'm getting the error: Couldn't read row 0, col -1 from CursorWindow

    When I don't put in the db.insert function, the error doesn't come up, but the table doesn't populate either so I think it's something to do with this? I don't see how the cursor itself could be the issue since i'm checking that its not null first.

    Can anyone help with this?

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

    Example of Lifecycle memory leaks that LiveData prevents

    Posted: 09 Apr 2020 09:22 AM PDT

    I am reading this article on LiveData.

    The article states that one benefit of LiveData, is that it prevent memory leaks....

    No memory leaks

    Observers are bound to Lifecycle objects and clean up after themselves when their associated lifecycle is destroyed.

    Can someone give a specific example of a memory leak that LiveData prevents?

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

    RecyclerView.OnScrollListener' s onScrolled() is called multiple times?

    Posted: 09 Apr 2020 08:57 AM PDT

    I am trying to implement pagination with Recyclerview. In the onScrolled() method of the RecyclerView.OnScrollListener I am detecting the end of the RecyclerView and then making the API call. But as soon as the RecyclerView reached the bottom, the API was called multiple times. After debugging I found, onScrolled() was called multiple times even when I scrolled just once?

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

    Web Services in Android app??

    Posted: 09 Apr 2020 08:55 AM PDT

    Do I need to integrate my voice assistant android mobile application with web services ,if I am using Firebase for the back end? I am really confused about the idea of web services or web servers and whether I need them at all for the app to function.

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

    Android TextView Styling

    Posted: 09 Apr 2020 04:53 AM PDT

    I have this following string res

    <string name="description">Your trial ends on

    <annotation font="semi_bold_text">%s</annotation>.

    You will be charged after your trial ends

    </string>

    I am using custom font(Montserrat) in my application. I want to use montserrat-semibold for the expiry date and montserrat-regular for the remaining text.

    I will set the expiry date using databinding

    android:text="@{@string/description(expiry_date)}

    or by using resources getString() method with varArgs

    val expiryDate = "Apr 9, 2020"

    context.resources.getString(R.string.description, expiryDate)

    But according to documentation,

    https://developer.android.com/guide/topics/resources/string-resource#StylingWithAnnotations

    they used annotations for static string alone.

    Is there anyway we can combine string formatting with annotations?

    Note: We cannot able to use Html.fromHtml() method as they don't support custom fonts as per android official documentation.

    https://developer.android.com/guide/topics/resources/string-resource#StylingWithHTML

    I raised the same issue in stack overflow. Here is the link.

    https://stackoverflow.com/questions/61120366/android-textview-multiple-fonts-and-string-formatting

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

    Here are some handy Android Studio keyboard shortcuts that will speed up our development process

    Posted: 08 Apr 2020 05:16 PM PDT

    Why is androidx.lifecycle.ViewModelProviders in “android.arch.lifecycle:extensions” instead of “android.arch.lifecycle:viewmodel”?

    Posted: 09 Apr 2020 07:40 AM PDT

    I create a default project in Android Studio 3.6. I could have access to `ViewModel()` as below without add any library to my build.gradle

    class MyViewModel() : ViewModel()

    It can `import androidx.lifecycle.ViewModel`

    I'm surprise, as I didn't even have `"android.arch.lifecycle:viewmodel"` in my gradle.

    However, when I want to use `ViewModelProviders`, as below

    private val viewModel: MyViewModel by lazy {

    ViewModelProviders.of(this).get(MyViewModel::class.java)

    }

    I'm surprise it is not readily available, nor is it in `"android.arch.lifecycle:viewmodel"` library.

    Instead it is in the `"android.arch.lifecycle:extensions"` library, that I have explicitly add.

    Why is `ViewModelProviders` in `lifecycle:extensions` instead of `lifecycle:viewmodel` library? I thought it's the essential part of having a `ViewModelProviders` when we use `ViewModel()`?

    Additional question: When do we need to include `"android.arch.lifecycle:viewmodel"`, since `ViewModel()` seems to be available by default?

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

    Unable to run two or more application in parallel using android studio 3.6

    Posted: 09 Apr 2020 05:31 AM PDT

    Unable to run two or more application in parallel using android studio 3.6

    I've just upgraded android studio from 3.4 to 3.6, and found out that I can not run 2 instances of the same application in parallel (which is very important for development).

    The first run starts without any problems, but the second one will hang until the first one is terminated, then it starts, which is not very useful. (see image attached)

    https://preview.redd.it/v4q2boabdsr41.png?width=2126&format=png&auto=webp&s=b29c7d9e6114b4e62306336da9511abdd3796e51

    This is an 'Application' run configuration for a gradle project, and I have 'Allow parallel run' checked.

    I never had this issue on android studio 3.4... and it doesn't make any sense why this is not possible.

    Also, I started seeing this issue after the upgrade https://stackoverflow.com/questions/60982242/how-to-fix-nosuchelementexception-scanner I'm sure its related somehow...

    Any help fixing this issue would be appreciated, thanks!

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

    Don't use AppLovin if you're trying out new ad networks in your app

    Posted: 09 Apr 2020 05:03 AM PDT

    Don't use AppLovin if you're trying out new ad networks in your app

    I've been trying to increase fill rate in my app, and so trying out new ad networks. But whenever I google about them I don't find much info about them from people who actually tried them out.

    So just in case you're trying to add AppLovin by looking at some fake ass paid reviews online, don't do it.

    I tried them out for 3 days, they have incredibly high CTR, but they only pay you per conversion. I might not have huge impressions here because it was only for 3 days, but you can still get the idea of how $hit it is in terms of eCPM.

    6100 impressions and $0.73 in revenue? $0.12 eCPM? That's lower than what banner ad from India pays me at FAN.

    https://preview.redd.it/xb4xdeig6sr41.jpg?width=1521&format=pjpg&auto=webp&s=dccceba3d8678ba395c8aec30e5a7e51b99e14fa

    https://preview.redd.it/r3ryv0ks5sr41.jpg?width=1500&format=pjpg&auto=webp&s=a05eb5b26dc28c34a30618884ae78bb14aeb3123

    So you're saying 75 people from USA clicked on the ad, and I get $0.61?

    I know 6200 impressions might not be enough data, but an ad network that gives $0.4 eCPM for US traffic isn't worth using imo.

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

    What are the best practices for admob ad placement to increase revenue?

    Posted: 09 Apr 2020 04:42 AM PDT

    I want to know how can i increase my ad revenue with more optimized ad scheme, i am currently using an interstitial on splash and it is giving me a good Return on my investment. i was wondering if i could get some suggestions of how to use ads to be more profitable. Currently i am using Natives in my activities and banners as well, and 1 interstitial on Splash

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

    Google playstore is now taking too much time to publish an update

    Posted: 08 Apr 2020 10:54 AM PDT

    Resubmitting an app after rejection

    Posted: 09 Apr 2020 02:02 AM PDT

    I got a mail (4 days ago) saying that my app was rejected with some reasons. It asked me to resubmit the app after making the changes. But in the play console the status still shows as "Pending Publication \n Processing Update". On hovering over it, it says "We're taking a bit more time to review your app. This usually takes a few days, but can occasionally take more".

    I am not able to submit my update. What should I do?

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

    Is this possible? Pressing a button (bixby), then saying something, then have it send that text to a specific app to have it do something. No or minimal keywords. Need a project during lockdown ��

    Posted: 09 Apr 2020 12:44 AM PDT

    I'm wondering if it's even possible. I want to create a note taking app. So in theory, I would press or hold the bixby button, have it start Google speech recognition, I say something, then it have it save that note in words And send it as an intent for a specific application. Then the application would log that note down. All while remaining in the background.

    How would you accomplish this? I know you can remap bixby using bxactions as ptt for zello, start Google assistant, so I know it can be changed. But is my scenario even possible?

    I want to avoid having to open my app, having it run in the foreground, not having to say ok Google, and not having to say tell MYAPP to make a note pickup groceries.

    I just want to press the button, and say pickup groceries. Or even LOG pickup groceries

    Thanks guys.

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

    Now in Android #15

    Posted: 09 Apr 2020 12:38 AM PDT

    Is it possible to have an app run as a background service in Android, that sends a HTTP request when it receives a SMS?

    Posted: 08 Apr 2020 11:55 PM PDT

    I'm looking to build a simple SMS forwarding service.

    1) App runs in background 2) Android phone receives SMS 3) App has a hook that triggers upon SMS received 4) App sends SMS contents to a server via HTTP

    Is this possible to do with an Android app?

    submitted by /u/aelesia-
    [link] [comments]

    Supporting different screen sizes

    Posted: 08 Apr 2020 11:23 PM PDT

    Hey guys a returning android dev here that has been out of the industry for sometime but getting back to it, regarding supporting different screen sizes what techniques are developers using nowadays besides the duplication of layouts in different folders.

    Layout/detail.xm Layout-sw320/detail.xml Layout-sw600dp/detail.xml

    I used to use this technique years ago , its still being used or is there any better way to support different screen sizes n resolutions without having to replicate 20 something layouts in different folders with different dimensions.

    Thank you any advice is appreciated.

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

    Different App Signature after releasing to PlayStore

    Posted: 08 Apr 2020 11:00 PM PDT

    So I was trying to integrate the SMS Retriever API and it requires the hash key, right? I generated them using my keystore. The SMS Retriever worked with the release apk. But if I upload that same build to the PlayStore, I noticed that the retriever doesn't work at all. I checked the app signature and it had a completely different one.
    And had a completely different hashkey.

    Anyone have any ideas why this could happen?

    TLDR - The release apk and live apk has totally different app signatures

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

    What to use/not use for Navigation?

    Posted: 08 Apr 2020 08:49 AM PDT

    Just trying to understand what everyone is using since there are enough choices to be made. What do you use in your app/are planning to use? How about using Viewpager?

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

    Route tracking with Google Fit

    Posted: 08 Apr 2020 10:10 PM PDT

    I'm a bit confused about the Google Fit API and want to confirm the following before I spend more time on it.

    Can I use Google Fit to track the user running and while doing so get stats of the route?

    Basically I want to develop a small RunKeeper, Endomondo, Strava clone. Would the Google Fit API be the right choice for such an app or should I take a more manual approach? And by manual approach I mean collecting location data from a location listener

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

    No comments:

    Post a Comment