0

I am now trying to send EditText data from one project's activity to another project's activity...but I can't find the method to send...Is it possible to send data between two applications in android???

Julia
  • 3
  • 3
  • possible duplicate of [launch activities from different package](http://stackoverflow.com/questions/2741857/launch-activities-from-different-package) – Simon Jun 15 '15 at 05:19
  • You could create a common file and read from it, if the data is not confidential. If it is confidential I suggest you to encrypt it. – Uma Kanth Jun 15 '15 at 05:21
  • Have a look at this - http://stackoverflow.com/questions/28380056/data-sharing-between-two-application-in-android – Logic Jun 15 '15 at 05:21

2 Answers2

0

in activity of first application,

Intent intent=new Intent();
intent.setAction("custom_actionname");
intent.putExtra("edittextdata","data");
sendBroadcast(intent);

Receiver of other application,

public class YourReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        String edittextData=intent.getString("edittextdata");
    }
}

manifest in second app

<receiver android:name=".YourReceiver">
            <intent-filter>
              <action android:name="custom_actionname"></action>
            </intent-filter>
</receiver>
balu b
  • 282
  • 2
  • 7
  • 1. How can i import "YourReceiver" class...This is in second project which is called by first project.? 2. Manifest.xml is which manifest? U mean second project? – Julia Jun 15 '15 at 05:55
-2

Just store the data you want in the phone using SharedPreferences. And read it in the other application.

Jack Xu
  • 75
  • 6