Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SIP application using Linphone

I am working on SIP application and using Linphone Library i have a little confusion while setting up the library to run the project.

Step 1: Firstly I Downloaded NDK on my Mac with the new Android SDK pkg. Then gaved the PATH of my NDK folder in ADT -> Preferences -> Android -> NDK

Step 2: Then i installed Autotools using this link (Only Followed Commands written under point: 2.3 How do I install the Autotools (as user)?) ndk_build

Step 3: After that i downloaded linphone-android using Terminal using -

 git clone git://git.linphone.org/linphone-android.git --recursive

Now i want to follow these steps : Step 4: Go to root directory of the downloaded project using command on Terminal:

$ cd /home/my_downloaded_project_path/linphone-android

And then Step 5:

$ ./prepare_sources.sh /home/android-ndk-r7b/ndk_build

I think then the build will be ready.

Step 6: Import the linphone-android project in eclipse and then run the project.

Now while i am doing Step 5: i am getting error

-bash: ./prepare_sources.sh: No such file or directory

I searched my whole Mac but i can't find this file (So how will it run then??)

Please can any one suggest me what i am missing or doing wrong. Are my steps correct (If you fell any modification in my steps kindly do tell me)

Another Approach that i tried is :

Downloaded Linphone Lib for Android from here Copied the ./prepare_sources.sh file and pasted in the directory where i got the code downloaded using terminal command as said in Step 3 above. Now ran this command

./prepare_sources.sh /home/android-ndk-r7b/ndk_build

and it worked on terminal but in last it showed me these messages:

.
.
.
er.bat  
inflating: SILK_SDK_SRC_v1.0.9/SILK_SDK_SRC_ARM_v1.0.9/test_vectors/test_encoder.sh  
cp ./patch_pic.diff SILK_SDK_SRC_v1.0.9/SILK_SDK_SRC_ARM_v1.0.9
cd SILK_SDK_SRC_v1.0.9/SILK_SDK_SRC_ARM_v1.0.9 && /usr/bin/patch -p0 < patch_pic.diff
 patching file Makefile
 Hunk #1 succeeded at 47 with fuzz 2 (offset 21 lines).
 ./prepare_sources.sh: line 41: abs_builddir: command not found
 ./prepare_sources.sh: line 41: abs_builddir: command not found
 ./prepare_sources.sh: line 41: /yuv2rgb.vs.h: Permission denied
 yuv2rgb.vs.h creation error (do you have 'xxd' application installed ?)
 /Users/myname/linphone-android/submodules/externals/srtp

How to resolve this i don't know??

like image 722
iPhnQ Avatar asked Sep 13 '13 12:09

iPhnQ


1 Answers

After you have installed the NDK and SDK you need to clone it and make sure you have set the PATH correctly. So go to the root folder where you have installed linphone

i.e

$ cd /Users/myname/Desktop/Android/linphone-android

To check the PATH of your NDK and SDK type the following into the terminal"

$ echo $PATH

If you see the path with the SDK and NDK location then it is configured correctly and you can proceed to running the make command. If not then set up the PATH using:

$ export PATH=/Users/myname/Documents/adt-bundle-mac-x86_64-20130729/sdk/platform-tools:/Users/myname/Documents/adt-bundle-mac-x86_64-20130729/sdk/tools:/Users/myname/Documents/android-ndk-r9:$PATH 

The above is export PATH=(Path of your SDK platform tools folder):(Path of your SDK tools folder):(Path of your NDK folder):$PATH. You need to make sure you add the correct directories where your NDK and SDK are.

Once this is done then run the make command from the terminal:

$ make

This should work and then you can import your project into eclipse and run it. Let me know how you get on. I spent days trying to get this working and this finally worked.

like image 135
DMC Avatar answered Nov 08 '22 20:11

DMC