Hi Good day
i want to know if possible to build apk in flutter with database that i created from django ? if possible how? if not why?
thank you and Goodbless
Hi Good day
i want to know if possible to build apk in flutter with database that i created from django ? if possible how? if not why?
thank you and Goodbless
Are you using REST APIs for your response and request in you flutter app?
Also are you creating web app or mobile apps via flutter?
yes im using restframework with django … i have mobile apps via flutter … if possible to include SQlite when flutter build to mobile APK?
So, you already have setup your Backend and it might have database also.
Now do you want to setup separate SQlite DB to your flutter app as well?
Its okey if not? i want to store it directly in backend. not in flutter app
the mobile app runs in emulator but when building to APK and install in mobile it cant log in … it because theres no database included when building a APK.
So the thing is you are already storing it to backend by using Rest APIs.
But still if the process is not clear than this simple flow might help you
If you get any errors than kindly share the tracebacks here
GET, POST, PUT,DELTE in my mobile app i can perform this request using emulator the problem is when building apk in flutter … it cant login
There might be some other error because even if you create build APIs still works.
I’ve also developed APIs that are being used in flutter app and even after creating build it still works.
There is another thing I need to know, are you running your backend on localhost?
And Also are you running your backend and flutter emulator in same system?
Yes my backend runs in localhost
Yes … what is the difference ? when building to APK and run to mobile devices to emulator? its possible to run backend in APK automatically?
Okay, so the problem is when you are running backend in localhost and uses APIs with localhost URL to your flutter development app then you are serving your APIs locally within same system.
On the other hand once you create a build, in order to run those APIs within your App you need to deploy it to the server from there your APIs can be accessible to any Apps.
my main concern is when building APK in flutter can i include both backend database and my backend app?
As much I know it is not possible to include your backend to your APK, Only APIs can be used via URLs.
Also Django needs a server to run and think yourself do you really want that user’s device i.e mobile become a backend server.
Backend serves same response to all the devices and by including it to specific APK will not work as your backend will be running on some mobile device.
This is not logical thing to do.
what is the best way to integrate my flutter app to my backend when app runs in mobile devices? using internet connections what if there’s no internet? can i connect with Bluetooth?
As I’ve told, you need to deploy your backend to server.
Well if you are using some source like backend with django then ofcourse you need your device to be connect with Internet. If there’s no internet show the message Internet not connected.
Tell me have you ever surf your browser or any APP that requires Internet connection with Bluetooth.
By reading your Posts it seems you are new to development, I suggest you to first clear the core concepts of Web Development than dive into development of single end first i.e Learn Backend (Django) first OR Learn Frontend (Flutter, HTML, CSS, JS anything) first.
thank you for your time … im new in mobile app im started a week ago but encountered error when i tried to connect my app in backend from mobile device … ive done learning in HTML, CSS, react JS./javascript… my goal is to know process of integrating mobile app to backend … ive tried using connecting using internet connection from mobile app to my unit as backend but same issue it cant connect to database…
Well you said you have learned react so tell me how you use your backend in react, via APIs right?
So same is for mobile app if you are using APIs than you need to deploy the BE server to make it live and let those APIs to be served to any device. Currently you are trying to serve the APIs from localhost and it won’t work.
yes … but i dont have experience in full deployment using react it runs only on my device… We are trying to deploy react js to azure but we encountered error when done build and deploy. We are currently converting our desktop app to web and integrate to mobile app.