Is there a way to install LiveAndroid to PC permanently?

by swapnil kamble » Mon, 07 Sep 2009 12:47:00 GMT


Sponsored Links
 Hi,
    There is new installable iso available. You can download that from

 http://code.google.com/p/android-x86/downloads/list 






-- 
...Swapnil

|| Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
|| Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||

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



Other Threads

1. Problems with Activity Lifecycle, onRestoreInstanceState/onActivityResult

I work on an application where ActivityA starts ActivityB with
'startActivityForResult'. Overall, this seems to work fine, but there
are two things I do not understand:

1. After ActivityB executes finish(), the *first* method called in
ActivityA is onActivityResult with the correct result. But ActivityA
is still in stopped state and therefore does not have its current
state available. Shouldn't it be that the correct sequence is:
ActivityA.onStart ... ActivityA.onResume...
ActivityA.onActivityResult??? Btw: both activities have default launch
modes.

2. Before ActivityB gets executed, ActivityA.onSaveInstanceState is
executed (and others of course) so that it can make its state
persistent. However, after ActivityB is finished
ActivityA.onRestoreInstanceState and/or ActivityA.onCreate are not
called so that the saved state is lost and the activity has no chance
to restore its previous state. I can't see any reason why this is not
the case. Could anyone give me some light on this issue?

Thanks
Danny

The source code (reduced to the min) is as follows:

public class ActivityA extends Activity {
    public static final int ACTIVITYB = 0x20000001;
    public static final String INTENT_BACK_ARGUMENT =
"ActivityBToAArgument";
        public final static String INTENT_ARGUMENT = "ActivityAToBArgument";
    private Intent activityResult = null;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(new AbsoluteLayout(this));
    }

    protected void onStart() {
        super.onStart();

        handleActivityResults();
    }

    @Override
    protected void onRestart() {
        super.onRestart();

        setContentView(new AbsoluteLayout(this));
    }

    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
        onSaveInstanceState(new Bundle());
    }

    @Override
    protected void onStop() {
        super.onStop();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    @Override
    protected void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putString("test", "testvalue");
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        String val = savedInstanceState.getString("test");
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);

        menu.addSubMenu(0, 1, 0, "Activity B");

        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        super.onOptionsItemSelected(item);

        Intent openFileIntent = new Intent(this, ActivityB.class);
        openFileIntent.putExtra(INTENT_ARGUMENT, "Test");

        startActivityForResult(openFileIntent, ACTIVITYB);
        return true;
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (resultCode == RESULT_OK) {
                activityResult = data;
        }
    }

    private void handleActivityResults() {
        if (activityResult != null) {
                finishActivity(ACTIVITYB);

                String msg = activityResult.getExtras().getString
(INTENT_BACK_ARGUMENT);
                activityResult = null;
        }
    }
}

public class ActivityB extends Activity {
        private static final int MENU_TEST = 1;
        private String argument = "";

        @Override
        protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(new AbsoluteLayout(this));
        argument = getIntent().getExtras().getString
(ActivityA.INTENT_ARGUMENT);
        }

        @Override
        public boolean onKeyDown(int keyCode, KeyEvent event) {
                if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
                        setResult(RESULT_CANCELED, null);

                        finish();
                        return true;
                }

                return false;
        }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        super.onCreateOptionsMenu(menu);

        menu.add(0, MENU_TEST, 0, argument);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
                Intent intent = new Intent();
                intent.putExtra(ActivityA.INTENT_BACK_ARGUMENT, "Seems ok");
                setResult(RESULT_OK, intent);

                finish();

        return true;
    }
}

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

2. ServerSocket.accept() not recognizing attempts to connect?

I am listening out for requests using the following method:

serverSocket = new ServerSocket(18081);
appendText("\nlistening..." );
Socket client = serverSocket.accept();
appendText("\nrequest");

The program outputs "listening...", but then blocks at
serverSocket.accept(), so "request" is never output.  I'm pretty sure
this is correct behaviour.  However, nothing I do seems to be able to
get the thing past this point!

I understand there are issues with ports/ip addresses and the
emulator, but I'm (also) trying this on a G1 device (though hooked up
via USB - software wont run if I unhook it from the USB port,
something to do with signing, but does it make a difference anyway?).
I have enabled the INTERNET permission, are there any others I need to
enable?

I've tried using a web browser and a telnet app on both my pc and the
device itself, and pointed them to the phone's IP (tried localhost,
127.0.0.1, and the device's global IP) using port 18081. My code just
doesn't do anything at all, just sits there merily waiting for a
client to connect to the socket.

Am I even testing this correctly? using telnet/web browser should make
it do *something* surely?

All the info I've found on the web is about the emulator, or
connecting to remote servers, or running client and server in the same
application... not running a server on the device itself and trying to
connect via an external program or from an external site.

Tearing my hair out here.  Any advice MUCH appreciated.

Dave.

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

3. bluetooth on android

4. How to uninstall calculator package from emulator

5. Texting with Android Dialer?

6. Anyone interested in an Android Meet-up located in the Bay Area (CA)?

7. Is there a way possible to get the source of android downloaded to windows XP?