[android-developers] Getting reference to service

2011-11-21 Thread mgolds02
I'm trying to write a simple service that will poll RSS data from an
RSS feed on start up.  However, the RSS data isn't needed until a
specific activity in my app is started.  I have the service written
and it is started via the main activity.  I'm wondering how to obtain
a reference to that service.  I know startService() will return a
ContextName of the service if it is already started.  Can I somehow
create a service object from that?  Or do I have to go through the
trouble of creating message handlers and do a request-response type of
setup between my service and activity?  I also toyed with the idea of
creating a singleton object and just initializing it on start up but
I'm very much opposed to the idea of singletons in general.  That
would be the lazy way out :p  If I am thinking to much into it and
there is a simpler way to accomplish this please let me know.

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Client/Server SSL Authentication

2011-11-22 Thread mgolds02
I need a few clients to connect to a few PHP web services via HTTPS.
I'd like for them to NOT have to enter any authentication details but
rather use certificate authentication.  I already have an CA
certificate and a secure domain.  Are there any good examples/
tutorials that provide a client/server certificate authentication?

Thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Client/Server SSL Authentication

2011-11-23 Thread mgolds02
Thanks for the reply.  However, this brings up another issue - how
does the server reject users that dont have the appropriate keystore?
This might be a bit off topic for the Android Developers group but a
point in the right direction would be appreciated.

Would this setting to only allow specific clients with the appropriate
keystore on the server be an Apache setting?

In general, how do apps that do not require any user credentials only
allow a given app to communicate with a server and reject all others?

Thanks!

On Nov 22, 9:35 pm, Nikolay Elenkov  wrote:
> Replying back to list.
>
> On Wed, Nov 23, 2011 at 1:59 AM, Mathew Goldsborough
>
>  wrote:
>
> > Sorry for the lack of detail.  The client would be either HttpClient
> > or HttpsURLConnection as I think both of these would accomplish my
> > goals.  However, if one has a simpler API or is easier to use when
> > using client/server certificate authentication, I'm open to using one
> > over the other.  Basically what the client is going to do is issue a
> > GET request to a specific endpoint to which the server will respond
> > with some XML. Simple enough, right?  I just want the client to be
> > authenticated via 2-way SSL certificate authentication prior to
> > receiving the response.
>
> For httpclient, the easiest way is to initialize this SocketFactory
> with your keystore, and use it create the HttpClient instance.
> You need to have your keystore as a raw resource in the apk.
> Search the list for more details, there are some examples, IIRC.
>
> http://developer.android.com/reference/org/apache/http/conn/ssl/SSLSo...
>
> For HttpsUrlConnection, the procedure is similar, initialize
> a socket factory and set it to your connection instance.
>
> http://developer.android.com/reference/javax/net/ssl/HttpsURLConnecti...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Pub/sub how to

2010-08-18 Thread mgolds02
I'm trying to write a pub/sub application.  I was wondering if there
were some 'best practices' i should follow?  Any information would be
greatly appreciated.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Receiving MMS

2010-08-18 Thread mgolds02
Hi,

I've looked all over but I cant seem to find any definite
documentation.  I'm wondering if it is possible for Android to have a
listener that listens on a certain port to receive MMS messages.  I
see its available for blackberry's by implementing the MessageListener
class.  Does android support this type of functionality and if so,
how?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en