Refresh Notification after deleting from user

by dillirao malipeddi » Thu, 05 Mar 2009 17:05:05 GMT


Sponsored Links
 while creating notification

set flags as FLAG_NO_CLEAR

then the notification remains after user clicks clear notification

 Notification my_notification = new Notification(R.drawable.iconl,
status_text, System.currentTimeMillis());

        my_notification .flags = Notification.FLAG_NO_CLEAR;

i think this will help you






-- 
Dilli Rao. M
ARIJASOFT
+91 - 9703073540

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. need help on https (code for http included)

thank you droidin,

unfortunately I didnt need the httpclient but the stream.

well, I found a solution :)

btw: this is sdk 1.1 r1 code:

greetings,
marco

------------------------------------------------------------------------
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;

import lgpl.haustein.Base64Encoder;

import org.apache.log4j.Appender;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.Layout;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.spi.LoggingEvent;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

/**
 * Hyper
 */
public class Hyper extends Activity {

        private static Logger logger = Logger.getLogger(Hyper.class);

        private static final String HTTP = "http://www.gmx.de";
        private static final String HTTPS = "https://www.verisign.com/";

        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);
                logger.debug("START");

                try {
                        SSLContext sc = SSLContext.getInstance("TLS");
                        scinit(null, new TrustManager[] { new MyTrustManager() 
}, new
SecureRandom());
                        
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
                        HttpsURLConnection.setDefaultHostnameVerifier(new 
MyHostnameVerifier());
                        HttpsURLConnection con = (HttpsURLConnection) new
URL(HTTPS).openConnection();
                        con.setDoOutput(true);
                        con.setDoInput(true);
                        con.connect();

                        BufferedReader br = new BufferedReader(new
InputStreamReader(con.getInputStream()));
                        StringBuffer sb = new StringBuffer();
                        String line;
                        while ((line = br.readLine()) != null)
                                sb.append(line);

                        logger.debug("InputStream: " + sb.toString());

                        logger.debug("END");
                } catch (Exception e) {
                        logger.error(e);
                }
        }

        /**
         * MyHostnameVerifier
         */
        private class MyHostnameVerifier implements HostnameVerifier {

                @Override
                public boolean verify(String hostname, SSLSession session) {
                        return true;
                }
        }

        /**
         * MyTrustManager
         */
        private class MyTrustManager implements X509TrustManager {

                @Override
                public void checkClientTrusted(X509Certificate[] chain, String 
authType) {
                }

                @Override
                public void checkServerTrusted(X509Certificate[] chain, String 
authType) {
                }

                @Override
                public X509Certificate[] getAcceptedIssuers() {
                        return null;
                }
        }

}
------------------------------------------------------------------------

--~--~---------~--~----~------------~-------~--~----~

2. Intercepting SQLite's file reads / writes, so we can encrypt the storage

Ok, Androids, I have an odd question on SQLite's file storage.

We have a need to encrypt the data stored within SQLite.  The obvious
approach would be to encrypt individual records before storing them in
the table, but that will melt down.  For example, if we want to search
for a string, we would have to actually retrieve everything in the
table and decrypt all of it to find the string.  Doing a join seems
like it would be impossible.  We're not even going to explore or
consider that route.

I know that SQLite stores all the data in a single flat file.  I
assume that it accesses that file by MemoryMappedFile or something
like that.  My idea is to create a sub-class of MemoryMappedFile that
does block encryption / decryption on write / read.  Doing so would be
quite efficient, and lets us use SQLite as normal.  We would somehow
have to pass that special encrypted MemoryMappedFile to SQLite when
the instance is constructed.

But I've never done this before and don't really know any of these
internals.  Does anyone have some insight on where to begin on that?

Thanks

--~--~---------~--~----~------------~-------~--~----~

3. how to integrate audio file with seekbar

4. Remove or hide scroll bar on webview

5. setImageBitmap issue

6. Any else having problems with Market publishers site?

7. How calculates memory usage of application