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. Parsing data from a calender on a website

I am fairly new to Android, but have some experience reading and
understanding code, including Java.
My question is: If I want to parse a URL such as a calender from a web
page, how do I go about this?

My thoughts: To pull the XML, do I use text?
i.e.:

try {
URL text = new URL( http:// and here is where I am not sure what to
have. The script below is the source for the calender in the XML of
the website
<script type="text/javascript"
src="9278a6f3de5f9e54f2aeeb74ac1f0a7eembedcompiled__en.js"></script>)

Do I then follow with XmlPullParserFactgory parserCreator =
XmlPullParserFactory.newInstance();
XmlPullParser parser = parserCreator.newPullParser();

parser.setInput(text.openStream(), null);  Do I still use an open
stream here?

rest of code.......

Thanks in advance for the help and insoght

-- 

2. 8 juta pilih tablet mana yah? ipad2, xoom or new SG Tab

dear all,

as subjek saya buka bahan diskusi lagi, monggo bagi yang mo nyumbang saran.

saya jujur mulai membutuhkan tablet ini dengan kebutuhan sbb :

1. Menggantikan netbook saya untuk melakukan presentasi produk ke
klien (web dev sampingan)
2. Tentunya saya memilih menggunakan layanan 3G akses (target kartu
sulastri lagi nih.... :) )
3. Sepertinya memang life style dan prestige juga penting
4. ketahanan batre untuk daily life
5. Penyedia aksesoris yang variatif

nah dari ke-5 opsi yang saya sebutkan di atas kira2 rekan2 semua
menyarankan saya memlih mana ya :
1. ipad 2 3G+wifi 16 or 32 GB <<-- jujur saya nunggu akhir april
pengen lihat harga pasar setelah singapore rilis
2. Xoom wifi+3G : klo liat harga hampir sebanding ama nomor 1, cuman
dengan fiturnya lebih lengkap dari nomor 1 mungkin hanya kalah dari
image ketersediaan aplikasi high endnya android (ex: imovie, garage
band)
3. SG Tab Wifi+3G : nomor 3 ini juga sepertinya layak untuk
dibandingkan dengan nomor 2, atau nomor 1

terima kasih bagi rekan2 semua yang memberikan saran, salam

-- 

Best Regards,

Mico Kelana Perdana
http://www.kelanasolution.com
http://blog.micokelana.com
http://facebook.com/micokelana
http://facebook.com/kantongajaibcreativedesign
Y!M : micokelana
--------------------------------------------------------------
Daftarkan direktori bisnis anda GRATIS...!!!
http://www.direktoritangsel.com
-------------------------------------------------------------
Harapan Ibu Islamic School Jakarta
Toddler- PlayGroup-Kindergarten
Elementary-Junior&Senior School
Islamic Bilingual School
http://www.harapanibu.sch.id
http://facebook.com/sekolahharapanibu
http://twitter.com/harapanibu

-- 
===============

3. Smooth transition between scroll and fling

4. Digest for android-developers@googlegroups.com - 25 Messages in 15 Topics

5. local and remote database synchronization

6. Disable "open" button after programmatic install?

7. 4G stack