use like this intent
Intent intent = new Intent(this,GoogleMapView.class); startActivityForResult(intent, 1); On Aug 18, 10:03 am, Honest <[email protected]> wrote: > hello, > > I tried to create service by following code but in logcat i got > following error " Unable to start service intent...." The following is > my manifest.xml file. > > <?xml version="1.0" encoding="utf-8"?> > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="com.saltriver.service" > android:versionCode="1" > android:versionName="1.0"> > <application android:icon="@drawable/icon" android:label="@string/ > app_name"> > <activity android:name=".ServiceExample" > 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> > <service android:name=".service.MyService"> > > <intent-filter> > > </intent-filter> > > </service> > <uses-sdk android:minSdkVersion="3" /> > <uses-permission android:name="android.permission.READ_FRAME_BUFFER"></ > uses-permission> > </manifest> > > I am calling service by folllowing code from the activity. > > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > try > { > setContentView(R.layout.main); > Intent serviceIntent = new Intent(); > > serviceIntent.setAction(".service.MyService"); > > startService(serviceIntent); > } > catch(Exception e) > { > Toast.makeText(this, "excepiton"+e.toString(), > Toast.LENGTH_LONG).show(); > > } > > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

