[android-developers] implicit intents
hallo i have made two applications A and B.A binds to a service of B using an implicit intent: intent i =new Intent (level1.level2); Application B has a service that has an intent filter for actions of type level1.level2. The problem is that B is not always called.Sometimes it is called anad everything works fine but some other times i get the following warning in DDMS : unable to start service Intent { act=level1.level2 } :not found why is that?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: implicit intents
problem solved..sorry for the posting On 16 Φεβ, 11:13, dane131 orestis...@gmail.com wrote: hallo i have made two applications A and B.A binds to a service of B using an implicit intent: intent i =new Intent (level1.level2); Application B has a service that has an intent filter for actions of type level1.level2. The problem is that B is not always called.Sometimes it is called anad everything works fine but some other times i get the following warning in DDMS : unable to start service Intent { act=level1.level2 } :not found why is that?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] android installer
hallo, i have 3 applications (in different packages ) and i want to be able to install the three of them at once as it was one application.Somehow, i want to make an installer that will install these 3 applications so that the user will not download manually each of them and install them one by one.Any ideas?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] add an aidl file in android framework
hallo , i want to add an aidl file in android framework so i can import it in two applications(one binds remotely to the other).How can i do that? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] add an aidl file in android framework
how can i add an aidl file in android framework? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: add an aidl file in android framework
problem solved On 15 Φεβ, 13:44, dane131 orestis...@gmail.com wrote: how can iaddanaidlfileinandroidframework? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: unable to bind to a service
anybody help? On 13 Φεβ, 00:44, dane131 orestis...@gmail.com wrote: hallo i have aservicethat provides gps coordinates.Here is the code : package app.suite.gps; import android.app.Service; import android.content.Context; import android.content.Intent; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import app.suite.gps.IGps; public class Service_impl extendsServiceimplements LocationListener{ double lat=37.96568 ; double lng=23.71382; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L, 500.0f, this); return mBinder; } private final IGps.Stub mBinder = new IGps.Stub() { @Override public double getLat() throws RemoteException { return lat; } @Override public double getLng() throws RemoteException { return lng; } }; public void onLocationChanged(Location location) { if (location != null) { lat = location.getLatitude(); ; lng = location.getLongitude(); } } @Override public void onProviderDisabled(String arg0) { // TODO Auto-generated method stub } @Override public void onProviderEnabled(String arg0) { // TODO Auto-generated method stub } @Override public void onStatusChanged(String arg0, int arg1, Bundle arg2) { // TODO Auto-generated method stub } } i want tobindto thisservicefrom another application which uses the following piece of code : package app.suite.client; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; public class Client extends Activity { IGps mservice=null; ServiceConnection conn=new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { Log.e(TAG,DISCONNECTED); } @Override public void onServiceConnected(ComponentName name, IBinderservice) { mservice=IGps.Stub.asInterface(service); try { double a=mservice.getLat(); String a_str=Double.toString(a); Log.e(TAG,a_str); } catch(RemoteException e) { } } }; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); Intentservice= new Intent(); service.setComponent(new ComponentName(app.suite.gps,app.suite.gps.Service_impl)); bindService(service, conn, BIND_AUTO_CREATE); } } When i run the code i get the security exception unabletobindtoservice (I have included the IGps.aidl file in both applications and generated the interfaces) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: unable to bind to a service
well ok i understand the risk..and i will change the architecture but anyway i have a problem to bind to a service of another apk even if its attribute is exported=true i wonder if i do someting wrong in my procedure: in the remote apk i generate an interface from an aidl file and make a service and with an anonymous class in it that extends MyInterface.Stub. In the client package i have an activity that has an object of type MyInterface (that is the mservice object of type IGps in the example above ) that i use it in order to call the methods exposed by my remote service.However i don't have visibility of that interface since it is in a remote package so i copy/paste the aidl from the remote package into my client package and generate the interface as well ( i also change the package name in the aidl file to that of my client package) so now i have visibility of the ineterface..but this does not seem to work ..do i make any mistake? On 13 Φεβ, 22:07, Dianne Hackborn hack...@android.com wrote: If you haven't declared an intent-filter in your manifest, then the component will be private to that .apk. You can make it public with either android:exported=true or defining an intent-filter. HOWEVER.. PLEASE be super careful about doing this. Did you realize that you are in the process of creating a nice big security hole, where you let any application get the user's current location without needing permission? Why are you doing this? The location APIs let applications get the current location. Why are you republishing that information in your own service? And why does this need to be in a separate .apk? My first instinct is for you to just not do this. Please. If you really think you need to do it, you need to seriously think about what you are doing with security. You would be very much best off putting all of this stuff in one .apk so you don't leak information to others. If for some reason you really think you need to have this separate (and take the overhead of multiple processes and all that), then you need to step back and take serious consideration of security and applying permissions to enforce it, how your .apks are signed, install ordering issues with granting permissions, etc. 2010/2/13 dane131 orestis...@gmail.com anybody help? On 13 Φεβ, 00:44, dane131 orestis...@gmail.com wrote: hallo i have aservicethat provides gps coordinates.Here is the code : package app.suite.gps; import android.app.Service; import android.content.Context; import android.content.Intent; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import app.suite.gps.IGps; public class Service_impl extendsServiceimplements LocationListener{ double lat=37.96568 ; double lng=23.71382; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L, 500.0f, this); return mBinder; } private final IGps.Stub mBinder = new IGps.Stub() { @Override public double getLat() throws RemoteException { return lat; } @Override public double getLng() throws RemoteException { return lng; } }; public void onLocationChanged(Location location) { if (location != null) { lat = location.getLatitude(); ; lng = location.getLongitude(); } } @Override public void onProviderDisabled(String arg0) { // TODO Auto-generated method stub } @Override public void onProviderEnabled(String arg0) { // TODO Auto-generated method stub } @Override public void onStatusChanged(String arg0, int arg1, Bundle arg2) { // TODO Auto-generated method stub } } i want tobindto thisservicefrom another application which uses the following piece of code : package app.suite.client; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; public class Client
[android-developers] unable to bind to a service
hallo i have a service that provides gps coordinates.Here is the code : package app.suite.gps; import android.app.Service; import android.content.Context; import android.content.Intent; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import app.suite.gps.IGps; public class Service_impl extends Service implements LocationListener{ double lat=37.96568 ; double lng=23.71382; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L, 500.0f, this); return mBinder; } private final IGps.Stub mBinder = new IGps.Stub() { @Override public double getLat() throws RemoteException { return lat; } @Override public double getLng() throws RemoteException { return lng; } }; public void onLocationChanged(Location location) { if (location != null) { lat = location.getLatitude(); ; lng = location.getLongitude(); } } @Override public void onProviderDisabled(String arg0) { // TODO Auto-generated method stub } @Override public void onProviderEnabled(String arg0) { // TODO Auto-generated method stub } @Override public void onStatusChanged(String arg0, int arg1, Bundle arg2) { // TODO Auto-generated method stub } } i want to bind to this service from another application which uses the following piece of code : package app.suite.client; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; public class Client extends Activity { IGps mservice=null; ServiceConnection conn=new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { Log.e(TAG,DISCONNECTED); } @Override public void onServiceConnected(ComponentName name, IBinder service) { mservice=IGps.Stub.asInterface(service); try { double a=mservice.getLat(); String a_str=Double.toString(a); Log.e(TAG,a_str); } catch(RemoteException e) { } } }; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); Intent service = new Intent(); service.setComponent(new ComponentName(app.suite.gps,app.suite.gps.Service_impl)); bindService(service, conn, BIND_AUTO_CREATE); } } When i run the code i get the security exception unable to bind to service (I have included the IGps.aidl file in both applications and generated the interfaces) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] bind to a remore service
Hallo, i have made an application that is consisted of an activity and a service.The service has an interface (created by an aidl file) including methods implemented in the service.My activity binds to the service and calls some methods of the service.All good till now.My problem is when i want to bind to a service that belongs to a different package from my activity.My activity doesn't have visibility of the remote interface and i cannot import it : public class Client extends Activity { /** Called when the activity is first created. */ IGps mservice=null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Intent i=new Intent(); i.setComponent(new ComponentName(aexp.share.sharedapp3, aexp.share.sharedapp3.Service_impl)); bindService(i, conn, Context.BIND_AUTO_CREATE); } ServiceConnection conn=new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { Log.e(TAG,DISCONNECTED); } @Override public void onServiceConnected(ComponentName name, IBinder service) { mservice=IGps.Stub.asInterface(service); try { double a=mservice.getLat(); String a_str=Double.toString(a); Log.e(TAG,a_str); } catch(RemoteException e) { } } }; } Here i cannot see the IGps interface,Am i doing something wrong? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] permission prtection levels
hallo, what is the protection level of the send_sms permission label? is it the dangerous level ? and something else i can't understand the signatureORsystem protection level...which are the additional applications that are succesfully granted these permissions compared to the signature level? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] bind to a service
hallo, I have made an activity that simply binds to a service,here is my code : public class LaunchApp extends Activity { /** Called when the activity is first created. */ Button dial; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Toast.makeText(this, text, Toast.LENGTH_LONG).show(); dial=(Button)findViewById(R.id.call_buddy); dial.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { launch_app(); } private void launch_app() { Intent launch_app=new Intent(); launch_app.setComponent(new ComponentName (aexp.share.sharedapp1,aexp.share.sharedapp1.Service1)); bindService(launch_app,mconnection,Context.BIND_AUTO_CREATE); } }); } ServiceConnection mconnection=new ServiceConnection(){ @Override public void onServiceConnected(ComponentName name, IBinder service) { Log.e(tag,connected); } @Override public void onServiceDisconnected(ComponentName name) { Log.e(tag,disconnected); }}; } i just want to get a message in the log when my activity connects succesfully or disconnects from the service.The above code does not do this and the messages are never written to the Log,can you give me some fixes for this code? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] permission enforcement
hallo, i have two applications A and B (in different packages).A can send an explicit intent to B to perform some kind of action.Then,I enforced a permission in application B called my.permissions.B_PERMISSION .The A application can still call B despite the fact that it doesn't have the appropriate uses-permission in its manifest.Have i understood something wrong? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: permission enforcement
i put the following tag in the manifest of app B: permission android:label=@string/B_PERMISSION_label android:name=my.permissions.B_PERMISSION android:description=@string/B_PERMISSION_desc android:protectionLevel=signatureOrSystem/permission and installed the application again.A could still call B (with an explicit intent) without having the uses-permission android:name=amy.permissions.B_PERMISSION/uses- permission tag in its manifest On 10 Ιαν, 19:42, Mark Murphy mmur...@commonsware.com wrote: dane131 wrote: Then,I enforced a permission in application B called my.permissions.B_PERMISSION Can you be more specific about how you attempted to do this? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: permission enforcement
what do you mean use it? so how can i create my own permissions for an application? On 10 Ιαν, 19:55, Mark Murphy mmur...@commonsware.com wrote: dane131 wrote: i put the following tag in the manifest of app B: permission android:label=@string/B_PERMISSION_label android:name=my.permissions.B_PERMISSION android:description=@string/B_PERMISSION_desc android:protectionLevel=signatureOrSystem/permission and installed the application again.A could still call B (with an explicit intent) without having the uses-permission android:name=amy.permissions.B_PERMISSION/uses- permission tag in its manifest permission says Hey, Android! Here's a new permission!. It doesn't actually protect anything unless you use it somewhere. http://developer.android.com/guide/topics/security/security.html#decl... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: permission enforcement
you were right..thanks mate On 10 Ιαν, 20:04, Mark Murphy mmur...@commonsware.com wrote: dane131 wrote: what do you mean use it? so how can i create my own permissions for an application? Please read the documentation I linked to: http://developer.android.com/guide/topics/security/security.html#decl... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] intents
i have two applications A and B (in different packages,but it doesn't matter).Application B is an sms application that i have made and contains one activity.This activity has a method called sendSMS(String number,String text).I want to call this method from application A and send an SMS without opening the activity(the GUI) of application B but just send an SMS in the background by calling just the method of the activity.Any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: intents
well i want the GUI as well..in order to function as a proper sms application but i also want to use its functionality without raising the GUI On 9 Ιαν, 00:46, Jason Proctor jason.android.li...@gmail.com wrote: if app B needs to be called via an intent, but has no UI, consider making it a Service? i have two applications A and B (in different packages,but it doesn't matter).Application B is an sms application that i have made and contains one activity.This activity has a method called sendSMS(String number,String text).I want to call this method from application A and send an SMS without opening the activity(the GUI) of application B but just send an SMS in the background by calling just the method of the activity.Any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- jason.vp.engineering.particle -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: intents
how can i do that?can you give link/s ? On 9 Ιαν, 00:52, Mark Murphy mmur...@commonsware.com wrote: dane131 wrote: well i want the GUI as well..in order to function as a proper sms application but i also want to use its functionality without raising the GUI Then split it into a Service (with an AIDL-exposed API) and your current set of activities. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in US: 8-12 February 2010:http://bignerdranch.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: intents
ok i will check it out..is there an easier way than that?? On 9 Ιαν, 01:06, Mark Murphy mmur...@commonsware.com wrote: dane131 wrote: how can i do that?can you give link/s ? Here are sample projects demonstrating an AIDL API in a service and a separate project accessing that API: http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/Re...http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/Re... Here is a slight revision of that same pair of projects, implementing an AIDL-based callback, so the service can communicate back to the client: http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/Re...http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/Re... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.1 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ContactsContract
i created a contact in my avd and run the following application package com.example.contents; import java.util.Queue; import android.app.Activity; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract.Data; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.Email; import android.widget.TextView; public class ContentProviders extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Uri contacts= Data.CONTENT_URI; TextView phone=null; Cursor cur = managedQuery(contacts, null, null, null, null); if(cur.moveToFirst()) //if cur!=null { do { phone=new TextView(this); phone.setText(cur.getString(cur.getColumnIndex (Phone.NUMBER))); setContentView(phone); }while(cur.moveToNext()); } } } But instead of the phone the name of the contact is returned.I also tried to get the email from my contact but it didn't show anything.What i am doing wrong? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ContactsContract
anybody help? On Dec 6, 6:37 pm, dane131 orestis...@gmail.com wrote: i created a contact in my avd and run the following application package com.example.contents; import java.util.Queue; import android.app.Activity; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.ContactsContract.Data; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.Email; import android.widget.TextView; public class ContentProviders extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Uri contacts= Data.CONTENT_URI; TextView phone=null; Cursor cur = managedQuery(contacts, null, null, null, null); if(cur.moveToFirst()) //if cur!=null { do { phone=new TextView(this); phone.setText(cur.getString(cur.getColumnIndex (Phone.NUMBER))); setContentView(phone); }while(cur.moveToNext()); } } } But instead of the phone the name of the contact is returned.I also tried to get the email from my contact but it didn't show anything.What i am doing wrong? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] activity lifecycle
By default, pressing the BACK key finishes (destroys) the current activity and displays the previous activity to the user. I made and run an app and pressed the back key and returned to the main menu.However, when i typed the 'ps' command in the terminal emulator the process of my app was still there..My app constists only of this activity..shouldn't the process be killed? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] call an activity of another package
hallo, i have an activity named SharedApp1 in the aexp.share.sharedapp1 package with the following simple code : package aexp.share.sharedapp1; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class SharedApp1 extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.main); Button launchButton = new Button(this); launchButton.setText(Launch); setContentView(launchButton); launchButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent i = new Intent(); i.setComponent(new ComponentName (aexp.share.sharedapp1,aexp.share.sharedapp2.SharedApp2)); startActivity(i); } } ); } } I haven't modified its manifest file and i use an explicit intent in order to call the activity SharedApp2 in the aexp.share.sharedapp2 package.But the application closes when i put the launch button (with the relevant error message and the 'force close' button.Please help... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: call an activity of another package
oh mate you were right..just fixed this i.setComponent(new ComponentName (aexp.share.sharedapp2,aexp.share.sharedapp2.SharedApp2)); and it worked...thought that the first parameter was a reference to the package we are in.. On Dec 1, 2:20 am, jotobjects jotobje...@gmail.com wrote: Looks like you are telling it that class SharedApp2 is in package aexp.share.sharedapp1 - which is probably not correct. Can you include the exception stack for the error in your post? On Nov 30, 3:40 pm, dane131 orestis...@gmail.com wrote: hallo, i have an activity named SharedApp1 in the aexp.share.sharedapp1 package with the following simple code : package aexp.share.sharedapp1; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class SharedApp1 extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.main); Button launchButton = new Button(this); launchButton.setText(Launch); setContentView(launchButton); launchButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent i = new Intent(); i.setComponent(new ComponentName (aexp.share.sharedapp1,aexp.share.sharedapp2.SharedApp2)); startActivity(i); } } ); } } I haven't modified its manifest file and i use an explicit intent in order to call the activity SharedApp2 in the aexp.share.sharedapp2 package.But the application closes when i put the launch button (with the relevant error message and the 'force close' button.Please help... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ipc and user ids
well intents are a form of ipc ,right? when do we use binders for ipc and when intents? what are the plus and the cons? On Nov 25, 2:09 am, Dianne Hackborn hack...@android.com wrote: It depends on what you are doing. This is pretty much all standard Linux stuff -- filesystem permissions, passing fds through sockets, etc. (Actually it is mostly really just generic Unix stuff.) You would probably be best looking specifically at Unix/Linux to find out the information you want, than asking here. The binder is the main Android-specific thing, but for purposes of security it is really the same semantics as passing an fd through a socket. 2009/11/24 dane131 orestis...@gmail.com well in what way do the kernel mechanisms allow the processes to see each other files(when the ids are the same),through shared memory,sockets?is a process with the same id with another one,allowed to write its address space? On 24 Νοέ, 05:10, Dianne Hackborn hack...@android.com wrote: They are allowed to do IPC between each other if the the things that check uids allow it. Your question is a little too general to answer more specifically than that. On Mon, Nov 23, 2009 at 12:51 PM, dane131 orestis...@gmail.com wrote: well,i am quite confused with the user ids stuff and what they mean in the process level.In Linux,every process uses its own virtual address space and no process can write to the address space of another process.So the communication between two processes is conducted via IPC mechanims which are part of the Linux kernel.Are two processes with different user ids allowed to ipc? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ipc and user ids
ok and something else... intents are a form of ipc right? when do we use binders for ipc and when intents? what are the plus and the cons? On Nov 25, 2:09 am, Dianne Hackborn hack...@android.com wrote: It depends on what you are doing. This is pretty much all standard Linux stuff -- filesystem permissions, passing fds through sockets, etc. (Actually it is mostly really just generic Unix stuff.) You would probably be best looking specifically at Unix/Linux to find out the information you want, than asking here. The binder is the main Android-specific thing, but for purposes of security it is really the same semantics as passing an fd through a socket. 2009/11/24 dane131 orestis...@gmail.com well in what way do the kernel mechanisms allow the processes to see each other files(when the ids are the same),through shared memory,sockets?is a process with the same id with another one,allowed to write its address space? On 24 Νοέ, 05:10, Dianne Hackborn hack...@android.com wrote: They are allowed to do IPC between each other if the the things that check uids allow it. Your question is a little too general to answer more specifically than that. On Mon, Nov 23, 2009 at 12:51 PM, dane131 orestis...@gmail.com wrote: well,i am quite confused with the user ids stuff and what they mean in the process level.In Linux,every process uses its own virtual address space and no process can write to the address space of another process.So the communication between two processes is conducted via IPC mechanims which are part of the Linux kernel.Are two processes with different user ids allowed to ipc? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ipc and user ids
well in what way do the kernel mechanisms allow the processes to see each other files(when the ids are the same),through shared memory,sockets?is a process with the same id with another one,allowed to write its address space? On 24 Νοέ, 05:10, Dianne Hackborn hack...@android.com wrote: They are allowed to do IPC between each other if the the things that check uids allow it. Your question is a little too general to answer more specifically than that. On Mon, Nov 23, 2009 at 12:51 PM, dane131 orestis...@gmail.com wrote: well,i am quite confused with the user ids stuff and what they mean in the process level.In Linux,every process uses its own virtual address space and no process can write to the address space of another process.So the communication between two processes is conducted via IPC mechanims which are part of the Linux kernel.Are two processes with different user ids allowed to ipc? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ipc and user ids
well,i am quite confused with the user ids stuff and what they mean in the process level.In Linux,every process uses its own virtual address space and no process can write to the address space of another process.So the communication between two processes is conducted via IPC mechanims which are part of the Linux kernel.Are two processes with different user ids allowed to ipc? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en