Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] Android connect to database with password authentification using Kotlin

Posted on November 11, 2022 By

Solution 1 :

You should go for Room Database

As per android developer docs:

The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite.

Room Database is the best.

Also, has support for RxJava as well as LiveData and Flows.
I recommend using Flows.

Problem :

I’m trying to program a simple android app with database connection, however I’ve only recently started with Kotlin and so far, even after several hours of searching, I haven’t found an understandable tutorial that shows how to enter/read something into a database via Kotlin…. Can anyone help here or has a good tutorial?

I’ve tried SQLiteOpenHelper so far, since I haven’t found an alternative for MySQL (both MySQL and SQLite are installed and set up on my server). However, with SQLiteOpenHelper, I can’t seem to specify a password to authenticate with the database….

Comments

Comment posted by mrvinrsk

First of all, thanks for taking the time to answer, but I think my question was a bit misleading; from what I’ve read Room Database is a local database on the respective Android device, but I need access to an external database as the data should be retrievable across devices, do you have a tutorial or similar on this as well, if possible using MySQL or SQLite in conjunction with a password for authentication? As I said, so far I have only found the SQLiteOpenHelper, which apparently can not pass a password and which apparently also only uses a local database…

READ  [FIXED] logging - How to view log of LOG(INFO) in android aosp
Powered by Inline Related Posts
Android Tags:android, database, kotlin, sqlite

Post navigation

Previous Post: [FIXED] android – W/Firestore: (24.1.2) [CustomClassMapper]: No setter/field for about found on class
Next Post: [FIXED] android – FusedLocationProviderClient and LocationCallback() object queries

Related Posts

[FIXED] android – Return a query without LiveData Android
[FIXED] java – How to correctly send doubles from service to activity Android
[FIXED] android – Why does the Material FAB not change colors when disabled? Android
[FIXED] android – How to select multiple images using intents in kotlin Android
[FIXED] android – Built in intent “actions.intent.GET_ACCOUNT” in App actions not called by user query “Check Balance in mybank” Android
[FIXED] android – Failed to generate key pair on Samsung S20, S20+ and S20 Ultra for biometric auth Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What is a good substitute for condensed milk?
  • ¿Como el cuerpo te avisa cuando te va a dar un infarto?
  • What is the luxury brand of Jaguar?
  • Who is Big poppa baseball player?
  • What material are foam runners?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme