1. Download our Official Android App: Forums for Android!

Apps Invoke Activity from Service

Discussion in 'Android Development' started by frank.sposaro, Mar 10, 2009.

  1. frank.sposaro

    frank.sposaro Lurker
    Thread Starter
    5

    Mar 10, 2009
    4
    0
    5
    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 Lurker
    Thread Starter
    5

    Mar 10, 2009
    4
    0
    5
    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...