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. A question about the Dalvik Vm

Dears :
      It seemed that the Dalvik Vm allowed only a limitted allocation
of memory to an application ,Though i can't tell exactly how much it
is, Could anyone tell me something more ??
and how can i get more memory for my application ,take 10M for
example ?
     Thanks !

Best regards!
 Ashrotronics
--~--~---------~--~----~------------~-------~--~----~

2. Field Test App - How does it get its data?

Hi All,

I am interested in finding out how the field test app gets hold of its
information, i have the android source, but the field test app does
not appear to part of it ( If i'm being blind, please guide me ;-) ).

Does anyone know how to get access to the sort of information that
field test app displays ( ARFCN, cell selection parameters, periodic
location update time etc etc...)

I see there is an API in the pipeline for the ( issue 700 ) though
there must currently be a way of doing it if the Field Test App can.

Hope someone has some info on this,

Cheers,

Liam.
--~--~---------~--~----~------------~-------~--~----~

3. send mail with format html

4. X86 ALSA Sound Issue

5. How to launch a 'selection dialog' on Android

6. Load ListView in ListActivity and prevent user

7. error during "make BUILD_TINY_ANDROID=true"