Multi-process applications and Android Market

by Marco Nelissen » Fri, 06 Mar 2009 07:03:56 GMT


Sponsored Links
 You can put everything in the same package, and make the service runs
in a different process by specifying the "android:process" attribute
for the service in your manifest.





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



Multi-process applications and Android Market

by Marco Nelissen » Fri, 06 Mar 2009 07:05:44 GMT


 I should have read further... :)
So you already tried that, but can't debug it? That seems weird. Why
can't you just attach the debugger to the other process? What happens
when you try?






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


Sponsored Links


Multi-process applications and Android Market

by Dianne Hackborn » Fri, 06 Mar 2009 07:12:05 GMT


 Yeah you can directly attach adb to any process and debug it.  You can also
have your process call Debug.waitForDebugger() if there is a place you want
to block for the debugger to attach.

Splitting an app into multiple .apks just to have it run in two processes is
very much not the model we encourage.








-- 
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.

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



Multi-process applications and Android Market

by Dianne Hackborn » Fri, 06 Mar 2009 10:44:44 GMT


 eah Eclipse is hard to figure out.  Basically you can go into the Eclipse
run menu for starting the debugger ("Open Debug Dialog..." on and the
"Remote Java Application" category on mine, your version may be different),
to have it attach to a socket. So in ddms, click on the process you want to
debug, which will forward it to port 8700, and then in the eclipse dialog
select host as "localhost" and port as "8700" to attach a debugger to it.

On Thu, Mar 5, 2009 at 5:16 PM, Mike Collins <mike.d.coll...@gmail.com>wrote:



--
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.

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



Other Threads

1. ActivitNotFoundException

Hi Everybody

Problem: When we run this program. then after click the button(voice
Recognition)

Show message box with exception what we catch
Exception:
android.content.ActivitNotFoundException:No Activity Found to handle
Intent{action=android.speech.action.RECOGNIZE_SPEECH}

Please give me solution of it. why ActivityNotFoundException throws in
program

SpeechActivity.java

package com.tutorial;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;


public class SpeechActivtiy extends Activity
{
        Button Voice_Rec_BTN;
        EditText VoiceResults_Txt;

        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState)
        {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.speech);

                Voice_Rec_BTN = (Button) findViewById(R.id.startvoice);
                Voice_Rec_BTN.setOnClickListener(new OnClickListener()
                {
                        public void onClick(View v)
                        {
                                startVoiceRecognitionActivity();
                        }
                });
        }

        /**
         * Fire an intent to start the speech recognition activity.
         */
        private void startVoiceRecognitionActivity()
        {
                Intent intent = new
Intent("android.speech.action.RECOGNIZE_SPEECH");
                //intent.setAction(ACTIVITY_SERVICE);
                try
                {
                        startActivityForResult(intent, 0);
                } catch (Exception e)
                {
                        // TODO Auto-generated catch block
                        Log.e(":::ERROR::", e.toString());
                        Toast.makeText(SpeechActivtiy.this, e.toString(), 
10).show();
                }

                Log.v(":::","444");
        }


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

}


speech.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/rellayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
     <ListView
     android:id="@+id/list"
     android:layout_width="fill_parent"
     android:layout_height="341px"
     android:layout_below="@+id/startvoice"
     android:layout_alignParentLeft="true"
     >
     </ListView>
     <Button
     android:id="@+id/startvoice"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:text="Voice Recognition"
     android:layout_alignParentTop="true"
     android:layout_alignParentLeft="true"
     >
</Button>
</RelativeLayout>


AndroidMainfest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.tutorial"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">

        <activity android:name=".SpeechActivtiy"
android:label="@string/hello">
                <intent-filter>
                        <action android:name="android.intent.action.MAIN" />
                        <category 
android:name="android.intent.category.LAUNCHER" /
             </intent-filter>
        </activity>
    </application>
    <uses-sdk android:minSdkVersion="3" />

</manifest>


string.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello World, SpeechToText!</string>
    <string name="app_name">SpeechTutorial</string>
    <string name="voice_recognition_prompt"> voice recognition Demo</
string>
    <string name="speak_button">Speak!</string>


</resources>


-- 

2. Need help with small animation

Hi,

|---------------------------------------------------
TEXT VIEW
---------------------------------------------------'
SLIDE DRAWER image


I have a layout like this above textview and an image that slides down after
clicking the text view

I have loooked at translate animation but the issue is I want the image to
start from the bottom of text view and gradually get into its full view.

Translate animation doesnt let me start from behind the textview so that it
can appear slowly and coming out at the bottom of text view and expanding to
its fullview


I have linear layout now with textview and imageview

Please let me know how to do this.

Thanks in advance with your help

-- 

3. help...the fact gue pake os desire...

4. Nubie

5. Trying to start the Hello World tutorial - can't create an AVD. Help!

6. Trying to start the Hello World tutorial - can't create an AVD. Help!

7. AudioTrack.getPlaybackHeadPosition() is buggy????