Iconic list View gets very slow when a service (running music) starts in the background

by Dianne Hackborn » Wed, 21 Apr 2010 05:41:55 GMT


Sponsored Links
 Does the same thing happen in the standard music app?  If not, have you
looked at the code for that app to see what it may be doing different?




>



Iconic list View gets very slow when a service (running music) starts in the background

by Prajakta Shitole » Wed, 21 Apr 2010 05:56:15 GMT


 Hi Dianne,

This does not happen in the standard music app. Thanks for guiding, I will
look into the standard music app code to check what it does differently.

Thanks,
Prajakta





>>


Sponsored Links


Iconic list View gets very slow when a service (running music) starts in the background

by Prajakta Shitole » Wed, 21 Apr 2010 14:29:34 GMT


 Hi,

My list view is slow due to a different reason. It is not due to the service
which runs in the background. My list view gets slow due to my logic
implementation. The service runs in the background and does not affect the
list view which runs on the main UI thread.

Thanks,
Prajakta






>>>



Other Threads

1. WebView and https post problem

Hi all!

I'm trying to get PayPal web page with requested donation parameters.
It works within IE or Firefox.

Can anyone advise whether I'm running some wrong code?

Layout main.xml:
---------------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     >

    <WebView
            android:id="@+id/viewFromPayPal"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"

/>
 </LinearLayout>
---------------------

Java code:
---------------------
public class DonationTestView extends Activity
{
        @Override
    public void onCreate(Bundle savedInstanceState)
        {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        LoadPayPal();
        }


        private void LoadPayPal()
        {
        WebView webContent = (WebView)findViewById
(R.id.viewFromPayPal);


                HttpParams httpParams1 = new BasicHttpParams();
                HttpConnectionParams.setConnectionTimeout(httpParams1, 10000);
                HttpConnectionParams.setSoTimeout(httpParams1, 10000);
                HttpClient httpClient = new DefaultHttpClient(httpParams1);




                HttpParams httpParams2 = new BasicHttpParams();

                httpParams2.setParameter("cmd", "_xclick");
                httpParams2.setParameter("business", "my_em...@address.com");
                httpParams2.setParameter("item_name", "Descr");
                httpParams2.setParameter("no_shipping", "1");
                httpParams2.setParameter("no_note", "1");
                httpParams2.setParameter("currency_code", "USD");
                httpParams2.setParameter("tax", "0");
                httpParams2.setParameter("lc", "IL");
                httpParams2.setParameter("bn", "PP-DonationsBF");

                HttpPost httpPost = new 
HttpPost("https://www.paypal.com/cgi-bin/
webscr");
                try {
                        HttpResponse response = httpClient.execute(httpPost);
                        httpPost.setParams(httpParams2);
                        HttpEntity entity = response.getEntity();
                        StringBuilder sb = new StringBuilder();

                if (entity != null)
                {
                        BufferedReader reader = null;
                try
                {
                        reader = new BufferedReader(
                                new InputStreamReader(entity.getContent()));
                    try
                    {
                        while(true)
                        {
                                String res = reader.readLine();
                                if(res.equals(0))
                                {
                                webContent.getSettings
().setJavaScriptEnabled(true);
                            webContent.getSettings
().setJavaScriptCanOpenWindowsAutomatically(true);
                            webContent.getSettings().setPluginsEnabled
(true);
                            webContent.getSettings
().setSupportMultipleWindows(true);
                            webContent.getSettings().setSupportZoom
(true);
                            webContent.getSettings
().setBlockNetworkImage(false);
                            webContent.getSettings
().setLoadsImagesAutomatically(true);
                            webContent.getSettings().setUseWideViewPort
(true);
                            webContent.loadData(sb.toString(), "text/
html", "utf-8");
                                        break;
                                }
                                Log.i("WEB", res);
                                sb.append(res);

                        }


                                        }
                    catch (Exception e)
                    {
                         webContent.loadData("<html>" + e.getMessage()
+ "</html>", "text/html", "utf-8");
                        return;
                    }


                }
                catch (IOException ex)
                {

                    throw ex;
                }
                catch (RuntimeException ex)
                {

                        httpPost.abort();
                    throw ex;

                }
                finally
                {

                    if(reader != null)
                        reader.close();

                }
            }
                }
                catch (ClientProtocolException e)
                {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
            webContent.loadData("<html>" + e.getMessage() + "</html>",
"text/html", "utf-8");
                }
                catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
            webContent.loadData("<html>" + e.getMessage() + "</html>",
"text/html", "utf-8");
                }
        }
}

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

2. signatureOrSystem permission protectio

Um yeah I guess you could use it for an app that is installed as a third
party app.  I can imagine any reason in the world why you would want to do
that though.  Actually it probably wouldn't work, since the system processes
system apps first, so it wouldn't know about your third party app permission
until well after it has granted permissions to the system apps.

On Fri, Mar 27, 2009 at 3:47 AM, guillaume leterrier (Teleca Germany) <






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

3. How does the application Knows EOF(End of file playback)

4. signatureOrSystem permission protectio

5. Related about progrssbar

6. Working with zip file in Android.

7. HTTPS connections through the browser, from within application