Thanks Dianne,
I tried a solution from John on the TTS group which worked well but I
soon realised that trying to the stuff I need on the BR is just a lot
more work and stupid :)
I am now writing a big post-it on my screen with: "Broadcast Receivers
are only to receive events and kick start services and activities
where you do the stuff you want to do - NOTHING ELSE" :)
Thanks again.
Nuno
(For other users: John's solution is:)
quote:
"Hi again,
sorted it!
you need to create a new context object from the TTS package context,
like so -
Context myContext = ctx.createPackageContext("com.google.tts", 0);
where ctx is the context from your BroadcastReceiver. Now use
myContext in your TTS constructor.
John
"
On Jul 9, 6:28 pm, Dianne Hackborn <[email protected]> wrote:
> You need to start your own service and do the work there. There are
> examples of this in APiDemos.
>
> On Thu, Jul 9, 2009 at 3:18 AM, nuno <[email protected]> wrote:
>
> > Hi all,
> > I am trying to start TTS from a broadcast receiver and it as document
> > an intent receiver can't bind the service.
> > Is there a work around, I can't figure out how to start the service
> > using startService(Intent, Bundle) any tips?
> > Thanks,
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails. All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---