Blogroll

Monday, September 30, 2013


Wednesday, September 25, 2013

We can use android libraries to enhance the graphical interface of the Moodle.libraries increases  the android app colorful and user friendliness.I have used two android libraries.

Android View Badger





Url-https://github.com/jgilfelt/android-viewbadger



Android SlidingMenu





Url-https://github.com/jfeinstein10/SlidingMenu


How to Add Android Libraries to Your Project

1.Right Click on the Project select properties from the menu

2.Select Android From the Window you will see a screen as follow






3.Click add and select  the library from the menu and click ok.Now successfully added the library








When I started developing android app I used to debug my apps on Android Emulator.but I couldnt take real idea about My Android app because i didn't run my app on real android device.so i decided to run it 
on a real android device.My android app should be connected with Apache server because mysql database is hosted in apache server.The problem i got when running moodle android app on real device is how to connect to the apache xampp server.sample Moodle course web also hosted in my localhost server.When i run android app on android emulator i use  http://10.0.2.2/Android_connect/get_mdl_user_details.php url to connect android app to localhost server.


These are the steps i followed  to connect my android app to  localhost server which i have been installed in my laptop.


Step 01

connect your android phone to your laptop where localhost have been installed.

Step 02

Enable USB debugging on your android device


In your device, to turn on USB debugging : “Settings” -> “Applications” -> “Development” -> “USB debugging”.
See figure below :

Step 03
Connect device to PC 
to check whether android device successfully connected with your pc 
In commmand prompt, change path to “Android SDK/platform-tools“, type command
 “adb devices“, if you see something like “some-weird-number device“, it means your device is connected to PC successfully

Step 04
In Eclipse right click on Android project, select “Run” -> “Run Configuration” -> “Android Application” -> “Target” tab -> “Deployment Target Selection Mode” -> set it to “Always prompt to pick device“, and you can select the device at runtime.




Step 05
In Eclipse right click on Android project, select “Run” -> “Android Application”Now you can see the available android device on the appear window now click ok




Step 06
You will be able to see android app running on your android device.provide username and password and click login button.then you see  a message box appearing as "Unfortunately AndroidMoodle stopped suddenly".
Reason 01
Your android device is not connected to the  WiFi network.because internet connection is needed to run the pc.
Solution
Create a wifi hostpot on your pc or laptop where your localhost and course web have been installed.
connect your android device to WIFI hostpot.

Reason 02
this url http://10.0.2.2/Android_connect/get_mdl_user_details.php cannot be used to connect moodle android app to localhost server.
Solution
Check your pc or laptop ipv4 address by running ipconfig command on cmd



then change the above url of your app adding your pc ipv4 address as follow..

Again Run android app and provide username and password,Click login button .Now you can successfully login to your android app 

Log In

Student Home