Invoke Activity from Service


Last Updated:

  1. frank.sposaro

    frank.sposaro New Member This Topic's Starter

    Joined:
    Mar 10, 2009
    Messages:
    4
    Likes Received:
    0
    Hello,

    I'm working on an app for fall detection.
    I have an activity that starts a service. The service monitors the accelerometer for abnormal readings. Once found, I need to Alert the Activity to do some task. I create an intent and call startActivity(Intent), but my log says that I can't call startActivity(Intent) from inside the service.

    Can anybody lend a helping hand? I've been looking at code examples and reading documentation, but it's not helping.

    Thanks
     

    Advertisement
  2. frank.sposaro

    frank.sposaro New Member This Topic's Starter

    Joined:
    Mar 10, 2009
    Messages:
    4
    Likes Received:
    0
    Oh man. What I wouldn't give to have this as the biggest of my problems again, lol.

    Anyway to answer my own question, you can only call startActivity from within a context. I'm actually working on AIDL now, that is what made me stumble back by my old post.
     

Share This Page

Loading...