-1

I have found that the code available for animating image views like here: How to programatically animate an ImageView

doesn't work when the ImageView is created inside a service and not an activity. How to then animate ImageViews in a windowmanager in an Android service?

Community
  • 1
  • 1

1 Answers1

0

Android Service are intended to run in background. They do not have access for UI elements. For example, inside a service, you cannot display toast messages or progress dialog or Alertdialog or any UI element which is visible to the user.

So, basically, you cannot do UI operations inside a service.

If you want to do animations inside an activity, which takes long time, you can use threads.

Akhil
  • 189
  • 7
  • 2
    I thought FB chat heads worked using a WindowManager in a Service? If not, do you know how else can that be implemented? Thank you for your answer. – Vishwesh Singh Oct 20 '14 at 12:38