Giter Club home page Giter Club logo

floating-bubble-view's Introduction

Hi There👋, I'm Tri Nguyen Do

A Passionate Software Engineer writing Mobile Apps since 2020 🔥. I've working with Android, Spring Boot, Python, Flutter and many other technologies. Currently focusing on Backend Development

Skill Set 💡
Language Java Kotlin Python JavaScript Dart Bash
Mobile Android Flutter React Native
Backend Spring Boot
Web ReactJS/NextJS
Database SQLite PostgreSQL
Others Firebase
Github Stats

Tri Do | Stats

What I'm doing now ? 👀

  • 🎨 Open Source Contributor
  • 🔥 Diving in software architectures and system design
  • ⭐ Developing awesome Projects on the Google Play Store

Reach me via 👇

floating-bubble-view's People

Contributors

kumpello avatar torrydo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

floating-bubble-view's Issues

opt-in background service termination, close-icon bottom elevation

Describe your suggested feature

Foreground notification

I want to capitalize on the foreground notification, for example I want to be able to maybe close the floating-bubble but the notification (started by FloatingBackgroundService) to remain visible, so that, for example, I can click on the notification to do other things such as re-opening the bubble, or maybe terminate the background service.

Close Icon

The close icon elevation from the bottom should be opt-in feature too.

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

`NullPointerException` when `stopService()` is called on the bubble intent

When I try to stop the service I get the following exception while I am not overriding setupExpandableView() and not using anything related to ExpandableView at all.

E/<> BubbleService: java.lang.NullPointerException
        at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.tryRemoveExpandableView(FloatingBubbleServiceConfig.kt:99)
        at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.tryRemoveAllView(FloatingBubbleServiceConfig.kt:92)
        at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.onDestroy(FloatingBubbleServiceConfig.kt:19)
        at com.torrydo.floatingbubbleview.FloatingBubbleService.onDestroy(FloatingBubbleService.kt:47)
        at android.app.ActivityThread.handleStopService(ActivityThread.java:4825)
        at android.app.ActivityThread.access$2200(ActivityThread.java:276)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2173)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:210)
        at android.os.Looper.loop(Looper.java:299)
        at android.app.ActivityThread.main(ActivityThread.java:8261)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
D/DecorView[]: onWindowFocusChanged hasWindowFocus true
W/System: A resource failed to call close. 

Fail to generate signed bundle/apk

Hi, this is a nice module.
I have only a problem that I'm not able to generate signed APP Bundle / APK.
Only the debug bundle / apk works.
It fails to find the definitions from the library. Is there anything i can do about it?
Thanks

Bubble going to the last position when clicked

Steps to reproduce

  1. Open sample app
  2. Move bubble
  3. Click red button
Screen.Recording.2023-09-11.at.11.25.08.mov

Expected behavior

Bubble stays in the same place

Actual behavior

On Android 13 and later bubble moves from last location to current

Crash logs

No response

Floating-Bubble-View version

0.5.6

Android version

Android 13 and later

Device

Pixel Emulator

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Unable to interact with other applications while bubbles are expanded

Steps to reproduce

Expand bubbles then can't touch to anything

Expected behavior

.

Actual behavior

.

Crash logs

No response

Floating-Bubble-View version

0.6.5

Android version

Android 13

Device

Xiaomi 11 Ultra

Other details

Currently, when expanding bubbles, users are unable to interact with other applications. Is it possible to limit touch events only to the expanded layout while still allowing interaction with other areas?

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Close bubble icon & duplicate icon displayed

Issues:

  1. Unable close service from the inside application without using the close button.
  2. If the user calls the floating bubble service before closing the previous floating bubble means a new duplicate bubble will be created automatically.

Screenshot_1669716180

can not implement

java.lang.NullPointerException
at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.tryRemoveExpandableView(FloatingBubbleServiceConfig.kt:89)
at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.tryRemoveAllView(FloatingBubbleServiceConfig.kt:82)
at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.onDestroy(FloatingBubbleServiceConfig.kt:13)
at com.torrydo.floatingbubbleview.FloatingBubbleService.onDestroy(FloatingBubbleService.kt:61)
at android.app.ActivityThread.handleStopService(ActivityThread.java:4789)
at android.app.ActivityThread.access$2200(ActivityThread.java:264)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2145)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8105)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
<> ChatBubbleService E java.lang.NullPointerException
at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.tryRemoveBubbles(FloatingBubbleServiceConfig.kt:101)
at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.tryRemoveAllView(FloatingBubbleServiceConfig.kt:83)
at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.onDestroy(FloatingBubbleServiceConfig.kt:13)
at com.torrydo.floatingbubbleview.FloatingBubbleService.onDestroy(FloatingBubbleService.kt:61)
at android.app.ActivityThread.handleStopService(ActivityThread.java:4789)
at android.app.ActivityThread.access$2200(ActivityThread.java:264)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2145)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8105)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)

I can't remove background of bubble usign Jetpack compose

Steps to reproduce

Create a layout in jetpack then change the layout like a circle or with rounded corners, the background of the bubble appears like dark/transparent.

Expected behavior

All background out of my layout should be transparent.

Actual behavior

The background is black with transparency

Crash logs

No response

Floating-Bubble-View version

0.6.4

Android version

13

Device

Google Pixel 6a

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Close view is buggy

Steps to reproduce

First - Scenario

  1. Define an expanded bubble view
  2. Just tap on the Icon
  3. During the time at which the expanded view is opening, the bottom close icon remains visible

image

Second Scenario

  1. Drag the popup sideways for example
  2. Drop the popup to be placed
  3. The close button remains visible (sometimes)

image

Maybe exposing closeBubble might help, or even append it to the minimize call

Expected behavior

The Bottom close icon should only be visible when the user is actively dragging the icon, then instantly close when not.

Actual behavior

Outlined at the steps to reproduce

Crash logs

N/A

Floating-Bubble-View version

0.6.3

Android version

Android 9.1

Device

Huawei mrd-lx1

Other details

The project that I've currently using.

SVID_20231016_234115_1.mp4

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Need to perform some action when view is expended.

Describe your suggested feature

Thank you for the great library, i am developing an application which needs to perform some function without user action and set to textview, which is inside the layout expandedView = LayoutInflater.from(this).inflate(R.layout.results, null). when expended view is visible this function will execute and perform some task. how to achieve this?

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Fail to use ModalBottomSheet in bubbleCompose

Steps to reproduce

.bubbleCompose {
Surface(
        modifier = Modifier
            .fillMaxSize()
        color = Color.Transparent
    ) {
        ModalBottomSheet(
            dragHandle = {},
            onDismissRequest = {  },
            sheetState = SheetState(true, confirmValueChange = {_ -> false},skipHiddenState = true, initialValue = SheetValue.Expanded),
        ) {
Text("test")
}
}
}

minimize()
// Click on the bubble to close which do a removeAll()
minimize()

Expected behavior

Bubble reopen

Actual behavior

Throw an exception when trying to show bubble a second time.

Crash logs

FATAL EXCEPTION: main
Process: com.github.snigle.apptimer, PID: 11230
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:1312)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:405)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
at androidx.compose.material3.ModalBottomSheetWindow.show(ModalBottomSheet.android.kt:534)
at androidx.compose.material3.ModalBottomSheet_androidKt$ModalBottomSheetPopup$1.invoke(ModalBottomSheet.android.kt:448)
at androidx.compose.material3.ModalBottomSheet_androidKt$ModalBottomSheetPopup$1.invoke(ModalBottomSheet.android.kt:447)
at androidx.compose.runtime.DisposableEffectImpl.onRemembered(Effects.kt:82)
at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1137)
at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:828)
at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:849)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1041)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:520)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:142)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1191)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:133)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:183)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:140)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1191)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:133)
at androidx.compose.ui.platform.Wrapper_androidKt.doSetContent(Wrapper.android.kt:104)
at androidx.compose.ui.platform.Wrapper_androidKt.setContent(Wrapper.android.kt:83)
at androidx.compose.ui.platform.AbstractComposeView.ensureCompositionCreated(ComposeView.android.kt:251)
at androidx.compose.ui.platform.AbstractComposeView.onAttachedToWindow(ComposeView.android.kt:283)
at android.view.View.dispatchAttachedToWindow(View.java:21290)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3491)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2820)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2328)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9087)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
at android.view.Choreographer.doCallbacks(Choreographer.java:899)
at android.view.Choreographer.doFrame(Choreographer.java:832)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Floating-Bubble-View version

0.6.3

Android version

API 34

Device

Pixel 3a (emulated)

Other details

I successfully show the bubble twice with only using a Surface component. I don't know if I miss something ?

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

show ExpandedBubble at the position of Bubble when clicked

Describe your suggested feature

This demo explains the feature we are looking for

https://youtu.be/2sAsE6CT_fE?t=117

Other details

The demo project shows the ExpandedBubble at the static position of .startLocation(0, 0) while we can customize this position , how can we show the ExpandedBubble at the position to which the original bubble has been dragged

the video explains what we want to achieve ,

How can we do this with this library

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Any way to apply custom image bitmap to the floating bubble?

I see we have to use val imgView = ViewHelper.fromDrawable(this, R.drawable.ic_rounded_blue_diamond, 60, 60)

Is there a way, I can pass the bitmap from the activity to the CustomService.kt class so that I show the floating bubble with that passed image.

Bubble resizing on click not working properly

Steps to reproduce

  1. Open sample app
  2. Move bubble to the right side of the screen
  3. Click next
  4. If the bubble is changing it's size it's not working properly (part of it is outside the screen or it moves to the center and is not animated to the egde)
Screen.Recording.2023-09-06.at.09.19.30.mov

Expected behavior

When bubble needs resizing after click it doesn't show outside the screen and if animate to edge is enabled it is dragged to the edge and not stays on the random place on the screen.

Actual behavior

Part of bubble is outside the screen or it moves to the center and is not animated to the egde

Crash logs

No response

Floating-Bubble-View version

0.5.6

Android version

I tried Android 13, Android 11 and Android Pie (9)

Device

Pixel Emulator and Xiaomi Redmi Note 8 Pro (Android 11)

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

bubble disappear arter call minimize() in expandedBubble's Composable

Steps to reproduce

this is my code, I want to show ExpandedBubble after click on a button in Bubble's Composable Or show Bubble after click on a ExpandedBubble's Composable

override fun configBubble(): BubbleBuilder? {

    return BubbleBuilder(this)
        .bubbleCompose {
            FloatMinimizePage(openExpandPage = {
                expand()
            })
        }
        .startLocationPx(0, 0)
        .enableAnimateToEdge(true)
        .closeBubbleStyle(null)
        .closeBehavior(CloseBubbleBehavior.DYNAMIC_CLOSE_BUBBLE)
        .distanceToClose(0)
        .bottomBackground(false)
}

override fun configExpandedBubble(): ExpandedBubbleBuilder? {
    return ExpandedBubbleBuilder(this)
        .expandedCompose {
            FloatExpandPage(openMinimizePage = {
                minimize()
            })
        }
        .startLocation(0, 0)
        .draggable(false)
        .style(null)
        .fillMaxWidth(true)
        .enableAnimateToEdge(true)
        .dimAmount(0.6f)
}

I test in a real device, and it's running normally when I click it in PC with mouse. But Bubble will disappear when I click it in the real device screen.

test.mp4

Expected behavior

bubble will show

Actual behavior

bubble disappear

Crash logs

no

Floating-Bubble-View version

0.6.4

Android version

Android 12

Device

OnePlus 7T

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

complex expandable view

Is there an instruction for implementing complex layout such as a layout containing a recyclerview some textviews some circlerImageView some imageviews and lottieAnimationView? I am getting error while infleting

FATAL EXCEPTION: main Process: com.horoftech.mc, PID: 3708 java.lang.RuntimeException: Unable to start service com.horoftech.mc.Services.ChatBubbleService@46b9692 with Intent { cmp=com.horoftech.mc/.Services.ChatBubbleService }: android.view.InflateException: Binary XML file line #57 in com.horoftech.mc:layout/viewprofilepicture: Binary XML file line #57 in com.horoftech.mc:layout/viewprofilepicture: Error inflating class android.widget.TextView at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4777) at android.app.ActivityThread.access$2100(ActivityThread.java:264) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2140) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:210) at android.os.Looper.loop(Looper.java:299) at android.app.ActivityThread.main(ActivityThread.java:8105) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045) Caused by: android.view.InflateException: Binary XML file line #57 in com.horoftech.mc:layout/viewprofilepicture: Binary XML file line #57 in com.horoftech.mc:layout/viewprofilepicture: Error inflating class android.widget.TextView Caused by: android.view.InflateException: Binary XML file line #57 in com.horoftech.mc:layout/viewprofilepicture: Error inflating class android.widget.TextView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:881) at android.view.LayoutInflater.createView(LayoutInflater.java:803) at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:957) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:977) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1031) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:988) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1150) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1111) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1153) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1111) at android.view.LayoutInflater.inflate(LayoutInflater.java:709) at android.view.LayoutInflater.inflate(LayoutInflater.java:547) at android.view.LayoutInflater.inflate(LayoutInflater.java:485) at com.horoftech.mc.Services.ChatBubbleService.setupExpandableView(ChatBubbleService.java:75) at com.torrydo.floatingbubbleview.FloatingBubbleServiceConfig.setupViewAppearance(FloatingBubbleServiceConfig.kt:30) at com.torrydo.floatingbubbleview.FloatingBubbleService.onStartCommand(FloatingBubbleService.kt:49) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4759) at android.app.ActivityThread.access$2100(ActivityThread.java:264) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2140) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:210) at android.os.Looper.loop(Looper.java:299) at android.app.ActivityThread.main(ActivityThread.java:8105) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045) Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 35: TypedValue{t=0x2/d=0x7f0303fd a=-1} at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:1001) at android.content.res.TypedArray.getDrawable(TypedArray.java:985) at android.view.View.<init>(View.java:6169) at android.widget.TextView.<init>(TextView.java:1035) AndroidRuntime E at android.widget.TextView.<init>(TextView.java:1029) at android.widget.TextView.<init>(TextView.java:1025) ... 29 more

nothing much implemented in the override method
` @nullable
@OverRide
public ExpandableView.Builder setupExpandableView(@nonnull ExpandableView.Action action) {

    LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
    View layout = inflater.inflate(R.layout.viewprofilepicture, null);

    layout.findViewById(R.id.profilepicture).setOnClickListener(v -> {
        Toast.makeText(this, "hello from card view from java", Toast.LENGTH_SHORT).show();
        action.popToBubble();
    });

    return new ExpandableView.Builder(this)
            .expandableView(layout)
            .dimAmount(0.8f)
            .addExpandableViewListener(new ExpandableView.Listener() {
                @Override
                public void onOpenExpandableView() {}

                @Override
                public void onCloseExpandableView() {}
            })
            .expandableViewStyle(null);
}`

Unable to pass parameters to `setupBubble()`/`setupNotificationBuilder()` from `onStartCommand()`

Hello Dear,

I was using version 0.5.0 and everything was working fine, but I wanted to upgrade to the latest version (v0.5.1) to have the new updates, unfortunlly, my class which implements the FloatingBubbleService() has an override for onStartCommand() method, once I upgraded the dependency, this overridden method stopped working, it is not called at all.

NOTE: I have made sure that I am registering the service in the <application> tag in the Manifest file and starting the service with an intent.

Also I would like to mention that I am using this method to initialize a lateinit variable that holds a value passed from the intent that starts the service to be used inside setupBubble() method, so if you have a better way to do that please suggest.

I would be glad if you could help me with this issue 🙏🏻

Thanks in Advance 🙏🏻❤

Move Bubble to closest corner

Describe your suggested feature

When you have the floating bubble and you pressed, moved it to closest corner instead of dissapairing, something like messenger, so it gives the impression that is opening the bubble

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Minimize bubble outise onCreate service

Steps to reproduce

 override fun onCreate() {
        super.onCreate()
        Timer().scheduleAtFixedRate(CustomTimerTask(this),0,5000)

    }


class CustomTimerTask(private val popup: Popup) : TimerTask() {
    override fun run() {
       // I want to do some check here and display the bubble if needed
        popup.minimize()
    }
}

Expected behavior

The bubble is displayed by the timerTask

Actual behavior

bubble is not displayed

Crash logs

No response

Floating-Bubble-View version

0.6.1

Android version

API 33

Device

Pixel 3a

Other details

I also tried to start bubble service from a CoRoutine, it works but ifI declare a timer in my coroutine I have the same issue

(I'm newbie in android development, maybe I miss something simple)

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Bubble touch not working properly

Steps to reproduce

I created a bubble using your ViewHelper, but when I touched it to expand it,There's only closebubble and it didn't expand.

Expected behavior

The bubble should expand when touched.

Actual behavior

Touching the bubble didn't expand it.
With the bubble touching the edge, press the bubble toward the edge to operate.

Crash logs

No response

Floating-Bubble-View version

0.5.6

Android version

android13

Device

Galaxy 22+

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Declaring MyClass in a separate file causes the bubble to not show up

Steps to reproduce

  1. Declare the intent within the MainActivity.kt file.
  2. Declare the MyClasss class within the same file.
  3. After configuring the method of that class run
  4. The bubble will show up
  5. Modularize the code by getting MyClass in a separate file
  6. Now the bubble doesn't show up

Expected behavior

The bubble shows up whether MyClass is declared within the MainActivity file or another separate file.

Actual behavior

The bubble shows up, only when MyClass is declared within the same file.

Crash logs

No crash logs. It just doesn't show up silently.

Floating-Bubble-View version

0.6.1

Android version

10

Device

Huwawei MRD-LX1F

Other details

I'm using a physical device for testing

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

`onUp()` callback is not called if the bubble is quickly released

Hello @TorryDo

I was implementing some logic in the FloatingBubbleListener callbacks but I have observed a behavior which I wanted to ask about.

When I tap on the bubble, the onDown() callback is called instantly as intended, but if I released my finger quickly from the bubble, the onClick() callback would be fired while onUp() is not.

If I tapped on the bubble and waited for a very short time (~1 sec), then the onDown() callback would be called without any issues as in the past case, but the onUp() callback would be called while onClick() not.

Here is the output for both scenarios for logging a statement in each mentioned callbacks:

First Scenario:

Bubble Tapped Down on: 99.0, 358.0
Bubble Clicked

Second Scenario:

Bubble Tapped Down on: 120.0, 332.0
Bubble Tapped Up on: 120.0, 332.0

So is it an intended behavior or it is a bug? 🤔

Thanks in advance ❤

support multi bubbles

Describe your suggested feature

Hi, did you support multi bubbles like Messenger app? Thanks so much

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Target and compileSdk 34 will lead to fatal error

If an app using your library, and target Android 34 will lead to android.app.MissingForegroundServiceTypeException: Starting FGS without a type .
It seem to be target android 34 will need to specific type of foreground in startForeground (which your library use for notification)
Details:
Caused by: android.app.MissingForegroundServiceTypeException: Starting FGS without a type callerApp=ProcessRecord{41f6370 } targetSDK=34
at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
at android.os.Parcel.readParcelableInternal(Parcel.java:4870)
at android.os.Parcel.readParcelable(Parcel.java:4852)
at android.os.Parcel.createExceptionOrNull(Parcel.java:3052)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.os.Parcel.readException(Parcel.java:2966)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6761)
at android.app.Service.startForeground(Service.java:775)
at com.torrydo.floatingbubbleview.FloatingBubbleService.notify(FloatingBubbleService.kt:233)
at com.torrydo.floatingbubbleview.FloatingBubbleService.onCreate(FloatingBubbleService.kt:67)

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.