How to execute a application automatically after android booting?

by swarup » Thu, 30 Apr 2009 17:48:52 GMT


Sponsored Links
 android.intent.action.BOOT_COMPLETED is broadcasted when the boot
completes.
android.permission.RECEIVE_BOOT_COMPLETED permission required to
receive this.

hope this helps you.



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

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



How to execute a application automatically after android booting?

by RajaniKanth » Thu, 30 Apr 2009 20:27:41 GMT


 Hi ,
     make android:persistent="true" in AndroidManifest.xml file.
Ur application will start automatically while booting.

RajaniKanth



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

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


Sponsored Links


Other Threads

1. Problem while calling the web services in android.

Problem while calling the web services in android.

To call web services in android I have done the following steps

1.      Wrote the web service class in java and stored in apache axis.
(in .jws format)


public class ADD2No
{
        public int add(int a,int b)
        {
                return (a+b);
        }

        public int sub(int c,int d)
        {
                return (c-d);
        }
}

2.      Then is have tested the web service on web browser.

http://192.168.1.41:8081/axis/ADD2No.jws

I have got.

There is a Web Service here
Click to see the WSDL
in browser.
3.      then I implement the service using core java and Ksoap2 library.
Its working fine.

4.      But I got error when I call the web service via android.

5.      This is my code.

package com.example.SamWebService;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class WebServiceInAndroid extends Activity
{
    /** Called when the activity is first created. */

        /*
         private static final String SOAP_ACTION = "HelloYou";
     private static final String METHOD_NAME = "getHello";
     private static final String NAMESPACE = "urn:HelloYou";
     private static final String URL = "http://localhost/lab/
service.php";
     */

    private static final String SOAP_ACTION = "ADD2No";
    private static final String METHOD_NAME = "add";
    private static final String NAMESPACE = "urn:ADD2No";
    private static final String URL = "http://elcserver:8081/axis/
ADD2No.wsdl";


   //private Object resultsRequestSOAP = null;


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

            TextView tv = (TextView) findViewById(R.id.txt1);

            setContentView(R.layout.main);

            try
            {
                  SoapObject request = new SoapObject(NAMESPACE,
METHOD_NAME);
                  request.addProperty("a", 3);
                  request.addProperty("b", 4);

                  SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
                  //envelope.dotNet = true;
                  envelope.setOutputSoapObject(request);
                  AndroidHttpTransport androidHttpTransport = new
AndroidHttpTransport(URL);

                  try
                  {
                       androidHttpTransport.call(SOAP_ACTION,
envelope);

                       //Parse Response

                       SoapObject resultsRequestSOAP = (SoapObject)
envelope.bodyIn;

                       //String xy = resultsRequestSOAP.getProperty
(0).toString();

                       tv.setText("Ganzes Rckagbeobjekt:
\n"+resultsRequestSOAP.toString());




                  }

                  catch (Exception e)
                  {
                       e.printStackTrace();
                  }

            }
            catch(Exception e)
            {
                tv.setText("Error : " + e.getMessage());
            }


       }



 }
6.      I have tried lot of methods still I am getting the error.
our application has been stopped unexpectedly
7.      my application manifest file is

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.SamWebService"
      android:versionCode="1"
      android:versionName="1.0">

    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".WebServiceInAndroid"
                  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-permission xmlns:android="http://schemas.android.com/apk/res/
android" android:name="android.permission.INTERNET"></uses-permission>

    <uses-sdk android:minSdkVersion="3" />
</manifest>

8.      So give me solutions to overcome this problem and how to define the
SOAP_NAME, METHOD_NAME, NAMESPACE and URL what they meant really.

9.      Give me the step by step procedure to call apache axis web services
from android.




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

2. rtsp protocol

Hello,
I have some questions about rtsp protocol.

1. Is it possible to save rtsp video stream on the sd card, instead of
redisplay on the screen?

2. Is it possible to capture displayed screen of the movie?


Code (in VideoView.java) shownbelow make only black screenshot of the
videoview/surface contener.



View mView = getRootView();

Bitmap bitmap = Bitmap.createBitmap(mView.getMeasuredWidth(),
mView.getMeasuredHeight(), Bitmap.Config.RGB_565);

Canvas canvas = new Canvas(bitmap);

draw(canvas);

try {

  FileOutputStream fos = new FileOutputStream("/sdcard/test.jpg");

  bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);

  fos.close();

}

catch (FileNotFoundException e) { Log.d("error",e.getMessage()); }

catch (IOException e) { Log.d("error",e.getMessage()); }

catch (Exception e) { Log.d("error",e.getMessage()); }



...

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

3. OutofMemory Excpetion in built in ZoomControls of mapView

4. How to register receiver the way the android manifest do.

5. sending email using java mail

6. MIDI Support in Android 1.5 SDK

7. How to get program to not relaunch when opened from programs list??