Giter VIP home page Giter VIP logo

adr_playground's Introduction

adr_playground's People

Contributors

flamyoad avatar

Watchers

 avatar

adr_playground's Issues

Android 13 FGS notification is swipeable unless setOngoing(true)

Starting in Android 13 (API level 33), users can dismiss the notification associated with a foreground service by default.

If you would like the notification to be non-dismissable by the user, pass true into the setOngoing() method when you create your notification using Notification.Builder.

https://stackoverflow.com/a/75026688/8621574

        return NotificationCompat.Builder(this, MY_FOREGROUND_CHANNEL_ID)
            setContentTitle("Title")
            .setContentText("Text")
            .setGroup("abccccc") // Prevent the FGS notification from being lumped in together in same group with others 
            .setContentIntent(pendingIntent)
            .setSmallIcon(com.flamyoad.styles.R.drawable.ic_notification_2)
            .setPriority(NotificationCompat.PRIORITY_HIGH)
            .setOngoing(true) // Starting in Android 13 (API level 33), users can dismiss the notification associated with a foreground service by default.
            .build()
    }

Does an empty foreground service keep an android app alive?

If an app has foreground service that depends on a RX stream that has lifecycle in @ApplicationScope (it's inside Application class)

If app is swiped up, foreground service will keep running, but is the app still running????

Any chance that closing the application manually will leave only the service running???

Context is the foreground service is broken if the @ApplicationScope stream is terminated.

It should be yes but We can't be too sure of it nowadays. Please check by running code on android 12 / 13

CustomTarget height & width actually downscales image @@ !!!

    // need to worry about transparency, !#!@#!@#!!#!@#!@#
    Glide.with(context)
        .asDrawable()
        .centerInside()
        .load(imageUrl)
        .into(object: CustomTarget<Drawable>(32, 32) {
            override fun onResourceReady(resource: Drawable, transition: Transition<in Drawable>?) {
            }
            override fun onLoadCleared(placeholder: Drawable?) {
                // no-op
            }
        })

fuck

Original image: https://w7.pngwing.com/pngs/941/692/png-transparent-black-small-apple-logo-logo-material-apple-logo-black-thumbnail.png

image

Downscaled INTO :
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.