glide for mysql database/loacal system - android

Glide.with(this).load("http://10.20.X.X/Images/image.jpeg").apply(RequestOptions.circleCropTransform()).into(img);
NOT WORKING FOR LOCAL DATABASE
EXPECTING TO GET IMAGE FROM LOCAL COMPUTER

Related

Display image using Glide and Retrofit from local computer memory

I have an android application which stores image in XAMMP (i.e C:\xammp\htdocs\php\imagefolder) at the time of registration. i am using XAMMP as local server, Retrofit for network activities and glide for image processing. Image is uploading successfully and image path is being stored in DATABASE. Now when i retrieve the information from database, i want to display that image in imageView using glide but i don't understand how i do that. In JSON response i am getting the path of the image and i am also fetching the json object from json array perfectly. But the problem is image is not loading with the help of glide
This is my image path retrieved from database imagefolder/1234abc.jg
This is actual path if image in my computer C:\xammp\htdocs\php\imagefolder\1234.jpg
and this is how i tried to load the image
Glide.with(this).load(ROOT_URL+OwnerPhoto).apply(RequestOptions.circleCropTransform()).into(header_imageview);
Glide.with(this).load(OwnerPhoto).apply(RequestOptions.circleCropTransform()).into(header_imageview);
and both methods failed
have your device or emulator in same network or wifi, then
on your computer find your ip address. must be like this:
192.168.x.x or etc
and use this ip address as ROOT_URL
instead of :
ROOT_URL = "C:\xammp\htdocs\php\imagefolder\1234.jpg"
use:
ROOT_URL = "http://192.168.x.x/php/imagefolder/1234.jpg"
hope it help you.

Why can I show data in emulator from MySQL database but not retrieve in on phones?

I retrieved data from MySQl database. It is shown in the emulator, but not on the device.
Please tell why this problem is happening and how I should solve it
Your emulator can easily access database which is in mysql and through xampp server. because your xampp server is available only for your computer. if you want to make it accessible to all devices then you need to put your databse to server.

Image rendering from Wamp server to android Application

My android application is caching an images from this address
"https://raw.githubusercontent.com/mobilesiri/Android-Custom-Listview-Using-Volley/master/images/Bill_Gates.jpg"
But it is not caching and showing the images from my wamp server's address which is
http://localhost/RightF/Upload/15.png
Through API this address looks like
"image":"http://localhost/RightF/Upload/15.png
I even dont get any error.

How to create sqlite database in online storage?

I need to make a app that adds data to local SQLite database and uploads data to a database so other people that use the app can download that data. I thought about loading SQLite database to online storage but I do not know how to do that or what the best way is.
This is one of the simple approach:
Your app <--->PHP webpage <----> sqlite (on server) --->url of SQLite to download
Your app need to connect to a web api, such as PHP, that can handle sqlite. You can perform sql operators via the api and then get the sqlite file by simply using its URL.
Tutorial
1.First create sqlite database
2.then create oracle database
Setup Apache server like xampp. After setup open php.ini. then delete ; before oci8.dll. then save.
C:xampp/htdocs create php webservice .
5.Call php webservice from android for download upload data.
If you can't I will help you

How can I set up a database on a localhost server?

I am developing an app for android which needs to connect to a database. For development purposes, I want to set it up on my local computer(Mac OSX El Capitan), I have already set up the localhost web server, I just don't know how to add a database to it, and access the elements through a web layer.
You'll probably want a database server also. You could use XAMPP for the webserver and the database server. Then you could use PHP to access the database and display the values on the website

Categories

Resources