-1

i do this two step

The additional Android way Two steps are necessary:

Mark the project you want to use as library project Reference the marked project Mark the library project

Right click your project and select Properties. Select Android on the left and tick the checkbox IsLibrary. Done.

Reference the marked project

Right click your project and select Properties. Select Android on the left and Add... your marked project. It will be added to the list and is ready to use. Now you are able to access all classes and ressources (e.g. drawables, strings) from the referenced, marked project. Awesome, eh? :)

that mention here Eclipse Android project, how to reference library within workspace? by poitroae but ... i recive in locate :

04-21 18:31:13.539: E/AndroidRuntime(19255): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.uploadvideo/com.examples.youtubeapidemo.FullscreenDemoActivity}; have you declared this activity in your AndroidManifest.xml?

and the activity crash...

what i do is in the main project i add

                     Intent intent1 = new Intent(this,FullscreenDemoActivity.class);
             intent1.putExtra("current_url",current_url);
             startActivity(intent1);

and in the library project i add

Intent intent= getIntent();
current_url = intent.getStringExtra("current_url");

i hope i can use intent to pass between this project

thanks ...

Community
  • 1
  • 1
idan
  • 1,508
  • 5
  • 29
  • 60

1 Answers1

0

i try this answer and it's doesnt work..

Unable to start intent from application containing library

"You need to specify the package of the application when calling an Intent defined in a library:"

Intent serviceIntent = new Intent();
serviceIntent.setAction("org.example.library.MY_ACTION");
serviceIntent.setPackage("org.example.application");
startService(serviceIntent);
Community
  • 1
  • 1
idan
  • 1,508
  • 5
  • 29
  • 60