Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ronycse778/cordova-api-fetch

An app built with Cordova-PhoneGap for fetching API, https or http request.
https://github.com/ronycse778/cordova-api-fetch

android-studio cordova http-request https-request phonegap rest-api

Last synced: 2 days ago
JSON representation

An app built with Cordova-PhoneGap for fetching API, https or http request.

Awesome Lists containing this project

README

        

# cordova-api-fetch
An app built with Cordova-PhoneGap for fetching API, https or http request.

Please, cover my another cordova repository first, so it will be easy.

https://github.com/ronycse778/cordova-phonegap-android-studio

For API server I use this repository

https://github.com/ronycse778/laravel-simple-rest-api

Type ipconfig in CMD, to find pc ip. suppose(192.168.68.108)

Clone the API server repository and follow processes and run with

php artisan serve --host=0.0.0.0

So, basically the server will run in http://192.168.68.108:8000

If server is ok, it can be checked with the link http://192.168.68.108:8000/api/v1/users in browser.

No login is required.

As this link is http server so, a cordova advanced http plugin is required.
Install it in app project by

cordova plugin add cordova-plugin-advanced-http

To show bug, output or anything in android studio console add

cordova plugin add cordova-plugin-console

After importing the project to android studio, to bind this ip(192.168.68.108)

1. Update your AndroidManifest.xml to use the network security configuration.

android:networkSecurityConfig="@xml/network_security_config"

... >



2. Create a file named network_security_config.xml in the res/xml directory of your project (create the xml directory if it doesn't exist).

content of this xml not shown in here, so check it from snapshot from Data.Source folder

To use this repository:

Clone it, unzip node_modules.zip, platforms.zip, plugins.zip

Change ip address from www folder/index.html file.

Check app ouput snapshot.

Done