java SE and the emulator

by kellogs » Sat, 21 Jun 2008 01:20:57 GMT


Sponsored Links
 Hi,

I am the happy owner of a desktop computer running on win xp, jdk
1.6.0.4 and android sdk m5.rc14. On this computer I have managed to
develop an application for andoid under eclipse IDE using ADT. I do
not know precisely what version of ADt is installed on my dektop
computer. All went well, my application ran flowlessly :)

Now the time has come for presenting my work .. for that, I shall need
a laptop. So I have acquired one, same XP, jdk 1.6.0.6, same android
sdk m5.rc14, same eclipse 3.3.1.1, some newer version of the ADT (of
course, if there was another release in arround 3 months), and,
surpirse: my project does not start appropiately. emulator launches
ok, but just after my first activity gets started, I get a big loooong
screen just oon the emulator saying something like:

"unresolved compilation problems: Syntax error, annotations aare only
available if source level is 5.0.
The type Map is not generic; it cannot be parametrized with arguments
<String, String>
Syyntax error, parametrized types are only available if source level
is 5.0"
etc etc...

Sooo, help please !

thank you,
kellogs

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



java SE and the emulator

by kellogs » Thu, 26 Jun 2008 23:54:04 GMT


 No more help needed. Issue solved

kellogs




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


Sponsored Links


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