When you think about what you can send between activities, think to
yourself "can I serialize this data to a text file and send it to
another process?"  In this case, you really can't do that, because you
can't serialize references (generally..).

You should not be doing this, a lightweight solution is to put this in
the global context:
http://stackoverflow.com/questions/12264678/intent-and-parcelable-object-android

Instead, it is advisable to have a service mediate access to the
socket: you write something like an `IntentService` which accepts
"command" intents, (perhaps backed by a content provider), and then
run the commands and hand the data back: communicating using an AIDL
interface.

Kris

On Thu, Jan 31, 2013 at 6:09 PM, bob <[email protected]> wrote:
> Is it possible to pass an open Bluetooth socket from one Activity to
> another?
>
>
> I guess I'm somewhat confused about what activities can and cannot pass.
>
>
> Thanks.
>
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to