How to use Java Runtime class in Android for starting another application from mine

by Sudheendra » Sat, 13 Mar 2010 09:57:09 GMT


Sponsored Links
 basically i want to start Notepad application in android from my
application , can i do this in android using runtime.exec() method of
RuntimeClasss and assign it to a process and kill the process later.

--



How to use Java Runtime class in Android for starting another application from mine

by Farproc » Sat, 13 Mar 2010 12:14:36 GMT


 If the notepad is an Android app, you should use
Activity.startActivity().




--


Sponsored Links


How to use Java Runtime class in Android for starting another application from mine

by TreKing » Sat, 13 Mar 2010 14:33:35 GMT


 



Like Farproc said, use startActivity(), but note that "Notepad application"
may not exist, so you probably either a) need to check it exists (using the
PackageManager) or b) use a generic intent to start any application to do
whatever it is you want to do with the Notepad app.



No.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
 http://sites.google.com/site/rezmobileapps/treking 

--



How to use Java Runtime class in Android for starting another application from mine

by Sudheendra » Sun, 14 Mar 2010 16:11:15 GMT


 Can u please guide me for a resource which talks about generic intents
and how to use them.

Thanks.






--



How to use Java Runtime class in Android for starting another application from mine

by Sudheendra » Mon, 15 Mar 2010 15:15:30 GMT


 Hi i have gone through the Resource and wrote a code for launching
Notepad through a launcher program . (Downloaded the Notepad code from
google ) But i am getting and Error saying "Process
com.intent.launcher has stopped unexpectedly ". My code goes like this


Launcher.Java

package com.intent.launcher;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;


public class launcher extends Activity {
    /** Called when the activity is first created. */
    @Override

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       Intent i  =  new
Intent(this,com.android.demo.notepad1.Notepadv1.class);
       startActivity(i);

    }
}

AndroidManifest.Xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=" http://schemas.android.com/apk/res/android" ;
      package="com.intent.launcher"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-permission android:name="android.permission.INTERNET" />
    <provider android:name=".Notepadv1"
android:authorities="com.android.demo.notepad1" />
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".launcher"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>

        <uses-sdk android:minSdkVersion="5" />

</manifest>

Can u please tell me the Error in  this code..

Thanks ,












--



How to use Java Runtime class in Android for starting another application from mine

by Sudheendra » Mon, 15 Mar 2010 15:15:48 GMT


 Also console in Eclipse is giving me this info
[2010-03-15 12:32:00 - Exoda] ------------------------------
[2010-03-15 12:32:00 - Exoda] Android Launch!
[2010-03-15 12:32:00 - Exoda] adb is running normally.
[2010-03-15 12:32:01 - Exoda] Performing com.intent.launcher.launcher
activity launch
[2010-03-15 12:32:04 - Exoda] Automatic Target Mode: using device
'HT94PL900012'
[2010-03-15 12:32:05 - Exoda] Uploading Exoda.apk onto device
'HT94PL900012'
[2010-03-15 12:32:09 - Exoda] Installing Exoda.apk...
[2010-03-15 12:32:12 - Exoda] Success!
[2010-03-15 12:32:12 - Exoda] Project dependency found, installing:
Notepadv1_Sol
[2010-03-15 12:32:12 - Notepadv1_Sol] Uploading Notepadv1_Sol.apk onto
device 'HT94PL900012'
[2010-03-15 12:32:13 - Notepadv1_Sol] Installing Notepadv1_Sol.apk...
[2010-03-15 12:32:17 - Notepadv1_Sol] Success!
[2010-03-15 12:32:17 - Exoda] Starting activity
com.intent.launcher.launcher on device
[2010-03-15 12:32:20 - Exoda] ActivityManager: Starting: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] cmp=co








--



How to use Java Runtime class in Android for starting another application from mine

by Bob Kerns » Tue, 16 Mar 2010 03:50:40 GMT


 Why don't you use the debugger to answer this question? Set exception
breakpoints on Exception and Error, and see where it stops, and why?

You can also get this from the log, but doing it from the debugger
lets you explore and gather more information.






--



Other Threads

1. Android bug : impossible to load animationdrawable with tabhost

yesterday I post this :
http://groups.google.fr/group/android-developers/browse_thread/thread/4195681dc59d1c46?hl=fr

but today this problem is not resolved and I think that the problem is
an issue between TanHost component and Animationdrawable.

I tried a lot of thing, but the start() method makes nothing. The
first drawable is displayed and that's all.

I would like to know if somebody can do a test to confirm it, I'll
post a bug just after. Thanks a lot.



-- 

2. How to remove a group membership with Android 2.0 contacts API?

Hi gurus,

I'm struggling with Android 2.0 contacts API. Could anyone give me a hint
how to delete a group membership with the new API? i.e. delete a contact
(id: 10) from a group (id: 2).

Your help is really appreciated! Thanks a lot in advance.

-- 
Best regards,
MTM
Contacts GroupU - Group your Android Contacts
http://contacts-groupu.appspot.com

-- 

3. Emai k-9 gak bisa buat acc yahoo

4. Andoird x86 eclair build error with unrecognized command line option "-Wno-psabi"

5. About registering/deregistering for gps updates

6. call an activity of another package

7. Instrumentation errors