Socket on SDK platform Error

by shuttle78 » Fri, 06 Mar 2009 05:19:29 GMT


Sponsored Links
 Hi,
I've developed an simple UDP socket connection client/server (in the
same application) with a standard java api, but when I try to start
the application in my sdk it crash.
I've tried to add the line
<uses-permission android:name="android.permission.INTERNET">
in AndroidManifest.xml file but I've the same problem.

Can you help my?

If I lunch the application with a normal java application (no andorid
api) it works fine.

Thanks for your help
Best Regards
Giulio

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



Other Threads

1. Logcat don't work anymore...

Logcat in eclipse has been working fine for me until bout a week ago.
I'm not sure how I managed to do it to both my of development
environments... (PC and Mac)

I get the follow error when I open up logcat in eclipse.

Could not create the view: For input string: "Debug"

java.lang.NumberFormatException: For input string: "Debug"
        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:
48)
        at java.lang.Integer.parseInt(Integer.java:449)
        at java.lang.Integer.parseInt(Integer.java:499)
        at
com.android.ddmuilib.logcat.LogFilter.loadFromString(LogFilter.java:
134)
        at com.android.ide.eclipse.ddms.views.LogCatView
$FilterStorage.getFilterFromStore(Unknown Source)
        at com.android.ddmuilib.logcat.LogPanel.createFilters(LogPanel.java:
1229)
        at com.android.ddmuilib.logcat.LogPanel.createControl(LogPanel.java:
441)
        at com.android.ddmuilib.Panel.createPanel(Panel.java:29)
        at
com.android.ide.eclipse.ddms.views.LogCatView.createPartControl(Unknown
Source)
        at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:
375)
        at
org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:
229)
        at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:
595)
        at org.eclipse.ui.internal.WorkbenchPage
$ActivationList.setActive(WorkbenchPage.java:4218)
        at org.eclipse.ui.internal.WorkbenchPage
$18.runWithException(WorkbenchPage.java:3277)
        at org.eclipse.ui.internal.StartupThreading
$StartupRunnable.run(StartupThreading.java:31)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:
134)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:
3586)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
        at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:
803)
        at org.eclipse.ui.internal.Workbench
$31.runWithException(Workbench.java:1567)
        at org.eclipse.ui.internal.StartupThreading
$StartupRunnable.run(StartupThreading.java:31)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:
134)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:
3586)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
        at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
        at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
664)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
        at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
115)
        at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
        at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
110)
        at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:
79)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
369)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

-- 

2. How can I keep dynamic views focused through an orientation change?

If I have a layout with lots of EditText views in a LinearLayout and
the user focuses the third one down and flips out the keyboard to
start typing, the entire layout is destroyed and recreated through the
activity lifecycle.  When everything is done, however, the third
EditText is given focus again and the user never knows that anything
happened and types away.

I am creating a similar layout, but due to the nature of my data, I
have to dynamically create the list of EditTexts, mixed with some
other views. The default layout has one EditText at the top, a
ScrollView with a LinearLayout child (which will be filled with
EditTexts later), and some action buttons at the bottom.  Then I fill
the LinearLayout with all the EditText fields I need (based on extras
passed via intent).

This part works quite well, but the way the activty handles Runtime
Configuration changes is broken now (from a UI perspective).  Now if
the user focuses the third EditText (which was dynamically created via
new EditText()) and flips out the keyboard, the layout is destroyed
and recreated, but focus is always given to the permanent EditText at
the top of the screen.

Is there something I need to do when adding my dynamic views to make
sure they can keep focus through orientation changes?  Or is there a
way I can work around the issue and force focus to be given to the
last view that had it before the change?

-- 

3. Produsen Smartphone Android Saling Memangs

4. Problem with context menu

5. Chm reader

6. unable to make encoders from android repo

7. Extending Application class and broadcast receivers