Intent to bring up top-most activity in task?

by westmeadboy » Sat, 27 Mar 2010 07:30:55 GMT


Sponsored Links
 If my app is already running, then either Activity1 or Activity2 might
be currently on top.

How to construct an Intent so that it will simply show whichever
Activity is already on top (in the task)? Just like if you touch an
icon in the Recent list (long-press home).

At the moment, it looks like (for explicit Intents) you need to be
explicit about the Activity to launch. But I would rather be explicit
about the app (package name).

FWIW, I'm thinking of Intents triggered via Notifications.

--



Other Threads

1. ApiDemos

Hi
Is any one who can show where  ApiDemos Project is located. I just
join this group and  wishing to complete all project until Jul
Donatien

-- 

2. Secure transport data between client and server

Hi,
I work into securing data between webservice and client android, I
deloy my web service with https url,before that I created the server
and client certficate,so when I try to access on it into android it
gives me errors

 WARN/System.err(: org.apache.http.NoHttpResponseException: The target
server failed to respond
 WARN/System.err(:     at
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:
85)
 WARN/System.err(    at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:
174)
    at
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:
179)
     at
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:
235)
    at
org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:
259)


Here is it the code that I used to access to my web service

protected ClientConnectionManager createClientConnectionManager() {

                SchemeRegistry registry = new SchemeRegistry();
                registry.register(new Scheme("http", PlainSocketFactory
                                .getSocketFactory(), 80));
                registry.register(new Scheme("https", newSslSocketFactory(), 
8181));

                HttpParams params = new BasicHttpParams();
                params.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 
30);
                params.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE,
                                new ConnPerRouteBean(30));
                params.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, 
false);
                HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
                android.util.Log.d("ok2", "ok1");
                ClientConnectionManager cm = new 
ThreadSafeClientConnManager(params,
                                registry);
                android.util.Log.d("ok", "ok3");
                return cm;
        }

        private SSLSocketFactory newSslSocketFactory() {
                try {
                        KeyStore trusted = KeyStore.getInstance("BKS");
                        InputStream in = context.getResources().openRawResource(
                                        R.raw.client);


                        trusted.load(in, "changeit".toCharArray());

                        SSLSocketFactory sf = new SSLSocketFactory(trusted);

                        // Hostname verification from certificate
                        // 
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e506
        
sf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);

                        return sf;
                } catch (Exception e) {
                        throw new AssertionError(e);
                }
        }

-- 

3. media player

4. How to make it fast <Android - Tls connection>

5. video player problem

6. Android widget eBook

7. nexus s mifare desfire ev1