• Breaking News

    Sunday, February 9, 2020

    Android Dev - A simple DIY library to generate your own custom Calendar View using RecyclerView, written in Kotlin

    Android Dev - A simple DIY library to generate your own custom Calendar View using RecyclerView, written in Kotlin


    A simple DIY library to generate your own custom Calendar View using RecyclerView, written in Kotlin

    Posted: 09 Feb 2020 12:53 AM PST

    Learning iOS as an Android developer

    Posted: 09 Feb 2020 05:25 AM PST

    I have been developing for Android for the past 3 years and would like to dive into the iOS market.

    I know that there's a lot of Swift and iOS tutorials on the internet, but what I'm looking for are those with comparisons to Android development. For example a tutorial saying the equivalent for Android stuff : "A view in android is ___ in iOS"

    Anyone know of a good one?

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

    KitKat and TLSv1.2

    Posted: 09 Feb 2020 03:28 AM PST

    Anyone done white-boarding in Kotlin?

    Posted: 08 Feb 2020 07:46 PM PST

    I have an interview at Facebook and a few other companies coming up and I am working through the Cracking the Coding Interview book. Has anyone done white boarding at any company in Kotlin? Did you use some of the built in Kotlin utility functions (reverse, sorted, filter, map, flatmap, toCharArray()...) and if so what did you for Big O for them? Memorize them, best guess, or just implement yourself?

    Also thoughts on using ArrayDeque for both Stacks and Queue questions?

    Do you use coroutines, or just do single threaded solutions unless asked?

    And any other things to consider for Kotlin vs Java white boarding? One thing I have noticed is that white board questions seem to often have inputs/outputs as Arrays rather than Lists/MutableLists which I generally use when coding in Kotlin.

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

    Google Play NOT indexing new apps again.

    Posted: 09 Feb 2020 01:15 AM PST

    It seems the problem from November is back. Apps published from ~Jan 27 does not appear in search results. You can find them only by removing spaces in the title or changing them to underscore.

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

    Google and Dark Mode

    Posted: 09 Feb 2020 04:00 AM PST

    Has anybody noticed that most apps by Google e.g Keep, Play Store, Calendar, etc when switched to dark mode use colors which are way too light compared to those suggested by the Material Design page on Dark Mode

    Does anyone know why this is the case?

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

    How to host app-ads.txt on Github Pages?

    Posted: 09 Feb 2020 12:33 AM PST

    I uploaded app-ads.txt to my Github Page: https://gmikhail.github.io/app-ads.txt

    I set my website https://gmikhail.github.io/ in Google Dev Console (Main page with apps list -> Settings -> Developer account -> Account details -> Website).

    I also tried to set the website on the app page (App control panel -> App page -> App description -> Website).

    But so far (three days have already passed) on https://apps.admob.com/v2/apps/appadstxt instead of urls are dashes is displayed.

    What am I doing wrong? Is it even possible to host app-ads.txt on Github Pages?

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

    Firestore alternatives? Is there an 'industry standard'?

    Posted: 09 Feb 2020 02:13 AM PST

    Not familiar with databases at all, other than firebase. But I'm developing an app that would require store of data and login authentication.

    Let's the app records workouts and sorts them into subcategories.

    Using firestore, I would do something like have a document of all the login auth encrypted, each login and has a subdocument of each workout year, which has subdocument of each workout month, which holds an instance of the workout class. The workout class has various attributes, like total time, sets time of each exercise etc.

    I've made a similar app in this way for practicing development, which is why I've described it that way. While this work implement fine, I feel like this isn't the 'proper' way. Login auth seems sketchy, and firestore implementation does give alot of headaches.

    What would be the best way/service to use to go about this?

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

    How to capture screenshots in AndroidStudio without, capturing bottom soft buttons?

    Posted: 09 Feb 2020 02:57 AM PST

    All the while, I was able to capture screenshots in AndroidStudio + Emulator, without capturing the bottom soft buttons (Back, Home, Recent)

    I was using the bottom left camera icon button to capture screenshot - https://i.imgur.com/BrpQB03.png

    However, I'm not sure what I have done, which causes the bottom soft buttons (Back, Home, Recent) always be capture. For instance, this is one of the capture screenshot. I do not want the bottom soft buttons bar - https://i.imgur.com/fRGyTpI.png

    This is my AVD manager - https://i.imgur.com/emqPv5n.png

    Any idea how I can avoid from capturing bottom soft buttons, when I was capturing screenshots using AndroidStudio + Emulator?

    Thanks.

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

    Setting Window background to @null in XML doesn't work after night mode is toggled

    Posted: 09 Feb 2020 02:15 AM PST

    I'm using DayNight theme.

    I set the window background like this <item name="android:windowBackground">@color/window_bg</item>

    and set the colors like this in colors.xml (default) <color name="window_bg">@null</color> in colors.xml (night) <color name="window_bg">@andoid:color/black</color>

    Also, I have this thing in my Main Activity's onCreate() AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)

    And the activity declaration in the manifest is just this <activity android:name=".MainActivity" android:configChanges="orientation|keyboardHidden" android:screenOrientation="portrait">

    So, when I toggle the night mode (from quick setting tiles) from dark to light, only the window background color doesn't change. I expected the color to be white but it was black.

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

    Creating Calculator App -- Newbie Question

    Posted: 09 Feb 2020 01:37 AM PST

    Im a newbie to android development and Im trying to make my own calculator app, I've come to a point where Im stuck. I've been able to grab my textView value and convert them to ints when I have only 2 values by hardcoding to grab the value from index 0 and 2; ie "1+2", I can grab 1 and 2 then force the addition since I know what Im adding, but now I want to make the calculator to function like a basic calculator by taking in multiple operands and operators, ie "12+3*34/12-4", Im not sure how I can go about storing multiple values and operands then calculating them, Im not worried about operator precedence at the moment, I would just like to figure out the part Im stuck on.

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

    Update rejected.

    Posted: 08 Feb 2020 09:41 AM PST

    I made new screenshots for my game. I out those screenshots in AB testing and Google approved it and started showing to 50% audience. And now when i applied the experiment result amd Google rejected update saying "graphic violence prominently depicted in app icons, promotional images, text, or videos".

    One time it approves and other time it rejects. What's this nonsense. Or am i doing something wrong here? My games ratings is 18+

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

    Retrofit Tutorial in Android - Part 3 Request Headers

    Posted: 08 Feb 2020 02:14 PM PST

    Does the Google Play Ranking Algorithm favor apps with in-app purchases?

    Posted: 08 Feb 2020 02:43 PM PST

    I recently integrated in-app billing into my app and I changed nothing else. Store entry, screenshots, and the description are still the same since months. Suddenly, after the first purchases are made, my daily installs increased by 50%.

    Since Google takes a 30% cut of your revenue it would make sense for Google to favor apps making money with in-app purchases over apps that don't make money at all or just make money with ads (which often results in less revenue for Google, even if the developer is using AdMob).

    Did you observe similar behavior with your apps?

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

    Flows, coroutines, and concurrent ongoing requests

    Posted: 08 Feb 2020 02:15 PM PST

    I had a problem and I'd like to share my solution to see if what I'm doing is fine. Maybe is also nice to talk about coding instead of so many posts about Play Store comments or suspension policies. =)

    My app deals with many georeferenced entities. As you move the map or perform other operations I need to access a web service to get some more info per each of those entities. For some functionality I even have a Flow that collects everything in a given radius to process. The problem is that if I use coroutines ongoing requests will get cancelled needlessly. E.g. if I get a GPS location slightly different the original flow will be canceled and a new one will be created... that will request from the server the same data!

    I need this:

    • Concurrent requests for the same data should wait on the same existing operation.
    • When all clients for a requests are canceled, the request should be canceled after a certain timeout.

    (LiveData can be used for this, but we shouldn't use LiveData for internal data handling anymore, they say)

    I've contemplated more complex results using BroadcastChannels, I've found unimplemented flow proposals... Finally I did this.

    My solution is simply a class that holds a caché of FutureResults that are wrappers around Deferred objects. The wrapper keeps a "waiting count" and when that reaches zero a cancel is scheduled after a given timeout.

    The code:

    class OngoingOperations<K, T>(private val defaultDispatcher: CoroutineDispatcher = Dispatchers.Default, cacheSize: Int, private val timeout: Long) { private val results = object : LruCache<K, FutureResult<T>>(cacheSize) { override fun entryRemoved(evicted: Boolean, key: K, oldValue: OngoingOperations<K, T>.FutureResult<T>, newValue: OngoingOperations<K, T>.FutureResult<T>?) = oldValue.cancel() } inner class FutureResult<T>(private val d: Deferred<T>, private val key: K) { /** only matters if d is not complete. */ private var waitingCount = 0 private var cancelJob: Job? = null suspend fun await(): T { synchronized(this) { cancelJob?.cancel() waitingCount++ } try { return d.await() } catch (e: Exception) { val cancel = synchronized(this) { --waitingCount == 0 } if(cancel) cancelJob = GlobalScope.launch(defaultDispatcher) { delay(timeout) synchronized(this@OngoingOperations) { results.remove(key) } } throw e } } fun cancel() = d.cancel() val isCanceled get() = d.isCancelled val isCompleted get() = d.isCompleted } suspend fun await(key: K, f: suspend CoroutineScope.() -> T): T = ( synchronized(this) { results[key]?.takeIf { !it.isCanceled } ?: FutureResult(GlobalScope.async(block = f, context = defaultDispatcher), key) .also { results.put(key, it) } } ).await() fun completed(key: K): Boolean = results[key]?.isCompleted ?: false @Synchronized fun close() = results.evictAll() } 

    Does this look right?

    When I need to start/wait for something to process I just do:

    ongoing.await(someId) { someLengthyProcess(someId) } 
    submitted by /u/niqueco
    [link] [comments]

    uploading an app

    Posted: 08 Feb 2020 09:39 PM PST

    when you upload an app does it cost $25 per app or only one time for ever 1 for a per app basis 2 for forever

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

    Android with Ml

    Posted: 08 Feb 2020 09:28 PM PST

    Hey guys , If you are interested in using machine learning with android checkout this article explaining how to train your machine learning model and intergrade it in your Android app

    https://medium.com/@kushaldave2011/ml-with-android-41fe5918bf33

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

    First app cross platform or nah?

    Posted: 08 Feb 2020 03:01 PM PST

    Hi all, So I came up with an idea for a stupidly simple timer that I want to turn into app. My question is if I should I do a cross platform PWA, use another type of cross platform development, or native if I want to monetize (tryin to help that college budget).

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

    No comments:

    Post a Comment