MohaStranger / sheel-ma3aya

Automatically exported from code.google.com/p/sheel-ma3aya
0 stars 0 forks source link

Facebook library link to the repo app #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
================
User story
================
Any Facebook user story.

================
Task
================
Link the Facebook library into our project.

==================
Scenario and Possible solution
==================

The problem when we every time open the project from eclipse. We link the 
project locally to com_facebook library.

It should have something in the build path attached to the project on the repo 
to avoid this problem.

Original issue reported on code.google.com by hossam.a...@gmail.com on 12 Nov 2011 at 2:13

GoogleCodeExporter commented 9 years ago

Original comment by passant....@gmail.com on 12 Nov 2011 at 5:18

GoogleCodeExporter commented 9 years ago
I think I knew the solution of the problem.

The easy way of doing it, is to have a big trunk, that has all the 
projects/folders we have on the same trunk.

When would you like to do that?

Original comment by hossam.a...@gmail.com on 13 Nov 2011 at 5:21

GoogleCodeExporter commented 9 years ago
You mean having more than one project on the same repo ??

JUST TO KEEP STUFF DOCUMENTED

Passant : [Nov 12]

I cannot attach it physically cuz simply it has no jar files to be physically 
attached to the project and i cannot generate them cuz its not supported in the 
SDK .. fa akeeeeed we are stuck with the library project thing .. el so2al b2a 
downloads wla SVN .. this is what i'm trying to reach ?

According to android SDK documentation :
You cannot export a library project to a JAR file
A library cannot be distributed as a binary file (such as a JAR file). This 
will be added in a future version of the SDK Tools.

Check these resources if you want to make sure 
http://developer.android.com/guide/developing/projects/index.html#LibraryProject
s
http://stackoverflow.com/questions/7973822/how-to-convert-an-android-library-pro
ject-to-an-external-jar/8103669#8103669

Hossam : [Nov 12]

i know the thing of the JAR file.. i read it before i made the issue

look.. think of adding a user library in the build path as we did when we were 
implementing the android GAE server in the lab.

it has something to do with the build path.

I think you ll find ur way.. um sure that this problem has a solution

Original comment by passant....@gmail.com on 13 Nov 2011 at 5:46

GoogleCodeExporter commented 9 years ago
Another way I read about but not sure about ... Adding the project to the repo 
and then editing the SVN: externals propoerty in the SVN file

Original comment by passant....@gmail.com on 13 Nov 2011 at 5:47

GoogleCodeExporter commented 9 years ago
You mean having more than one project on the same repo ??

Yes :)

When would you like to do that?

Original comment by hossam.a...@gmail.com on 13 Nov 2011 at 6:33

GoogleCodeExporter commented 9 years ago
I'm re-visiting this problem now to resolve it

2 approaches to be tried:

1) Creating a jar file of the Facebook Library and copying the content of its 
android manifest to to our manifest file

2) Adding the project to a libs folder inside sheelma3aya + adding its android 
manifest content to sheel ma3aya manifest ==> linking with respect to the 
project location

Original comment by passant....@gmail.com on 8 Dec 2011 at 6:23

GoogleCodeExporter commented 9 years ago
I will be working on this issue too in this sprint (Sprint 2).

Original comment by hossam.a...@gmail.com on 9 Dec 2011 at 6:38

GoogleCodeExporter commented 9 years ago
Thanks to hossam's hint, the problem is solved

CURRENT SOLUTION:
add the src package to the src packages of the project + add respective 
resources + fix references to the package and imports of R file references

OTHER NON WORKING SOLUTIONS:
A) Use the facebook jar file
** reason: it will work perfectly if you just reference the different 
activities. The problem is on referencing a method like authorize used for 
login. It uses R.drawable to display some images. However, you cannot reference 
an R file from the JAR
** attempt to solve it: add the resources to sheelma3aya project and re-build 
to have references to such resources in the project R file -> FAILED because 
the code still attempts to reference it from inside the jar file
** possible solution: try altering the R references to be more generic as 
resources + regenrate a new jar file -> use

B) create libs fodler and copy/paste all the facebook project and link resource
** reason: such process regenrates new package names with a different prefix 
which needs updating the imports. After doing so, the R file is not updates 
with the new references. However you cannot build it because it is not seen as 
a project

Original comment by passant....@gmail.com on 11 Dec 2011 at 8:17