Coder Social home page Coder Social logo

codelab-android-people's Introduction

People: Conversations and Bubbles

This repository contains the source code of the codelab for Android 11 codelab, People: Conversations and Bubbles.

Getting Started

Check out the master branch and follow the instructions here: https://codelabs.developers.google.com/codelabs/android-people

Images

License

Copyright (C) 2020 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

codelab-android-people's People

Contributors

yaraki avatar

Stargazers

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

Watchers

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

codelab-android-people's Issues

System UI keeps stopping when dismiss the bubble

I got crash by following these steps:

  1. Click to Sheep
  2. Click Open Bubble chat by clicking on action bar menu icon
  3. Wait for incoming chat via bubble
  4. Click on bubble chat
  5. Drag bubble to X (close) area

Crash content:

2020-07-16 17:59:22.848 21078-21078/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.android.systemui, PID: 21078
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.systemui.bubbles.BubbleStackView.setSelectedBubble(com.android.systemui.bubbles.BubbleViewProvider)' on a null object reference
        at com.android.systemui.bubbles.BubbleController$9.applyUpdate(BubbleController.java:1266)
        at com.android.systemui.bubbles.BubbleData.dispatchPendingChanges(BubbleData.java:503)
        at com.android.systemui.bubbles.BubbleData.notificationEntryRemoved(BubbleData.java:297)
        at com.android.systemui.bubbles.BubbleStackView.dismissBubbleIfExists(BubbleStackView.java:2088)
        at com.android.systemui.bubbles.BubbleStackView.dismissMagnetizedObject(BubbleStackView.java:2080)
        at com.android.systemui.bubbles.BubbleStackView.access$800(BubbleStackView.java:115)
        at com.android.systemui.bubbles.BubbleStackView$4.lambda$onReleasedInTarget$0(BubbleStackView.java:425)
        at com.android.systemui.bubbles.-$$Lambda$BubbleStackView$4$aSvR9-6CLWJ5wWFJfNBEMIcwA5g.run(Unknown Source:2)
        at com.android.systemui.bubbles.animation.PhysicsAnimationLayout$PhysicsPropertyAnimator$4.onAnimationEnd(PhysicsAnimationLayout.java:998)
        at androidx.dynamicanimation.animation.DynamicAnimation.endAnimationInternal(DynamicAnimation.java:695)
        at androidx.dynamicanimation.animation.DynamicAnimation.doAnimationFrame(DynamicAnimation.java:670)
        at androidx.dynamicanimation.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:158)
        at androidx.dynamicanimation.animation.AnimationHandler$AnimationCallbackDispatcher.dispatchAnimationFrame(AnimationHandler.java:61)
        at androidx.dynamicanimation.animation.AnimationHandler$FrameCallbackProvider16$1.doFrame(AnimationHandler.java:207)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
        at android.view.Choreographer.doCallbacks(Choreographer.java:796)
        at android.view.Choreographer.doFrame(Choreographer.java:727)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Using from a foreground service?

I've tried to adapt this code for use in a foreground service. That is, instead of:

notificationManager.notify(chat.contact.id.toInt(), builder.build())

... I would like to do:

startForeground(NOTIFICATION_ID, builder.build())

However, I've been unsuccessful in making it work (the equivalent code works fine in Android 10 with Bubbles turned on in Dev Settings). Are there further things needed to make this work is this a known limitation that no longer should work?
Or is it just a bug in the beta?

Add to recent bubbles tab

Hi

I got my bubble notifications working by following the steps on the official documentation https://developer.android.com/guide/topics/ui/conversations .
Now when dismissing a bubble on purpose through dragging it into the X bin it does not afterwards show up in the recent bubbles tab. This also does not happen when there have been more then 5 different conversation bubbles and the oldest is being tossed out. Is there anything specific to add to the notification? Thanks a lot for your help in advance

best regards

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.