Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 0e5ff70

Browse files
author
Chris Board
committed
Added a demo application
Added a demo application to sample how to use Android MySQL Connector library
1 parent a28745b commit 0e5ff70

33 files changed

+921
-1
lines changed

.idea/assetWizardSettings.xml

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
57 Bytes
Binary file not shown.

.idea/caches/gradle_models.ser

76.1 KB
Binary file not shown.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,10 @@ If it shows TLSv1 then this won't be supported by the Android MySQL Connector li
456456
If MySQL supports it, you can add `tls_version=TLSv1.1` or `tls_version=TLSv1.2` (Check your mysql version documentation to determine the supported TLS) to your `/etc/main.cf` file and restart MySQL. This needs to be added under the `mysqld` section of the config file.
457457

458458
If you are using Amazon RDS then you will need to use at least MySQL 5.7.16. Previous version of Amazon RDS for MySQL only support TLS 1.0 so the library won't be able to connect.
459+
460+
# Demo Application
461+
There is a module in the project called demoapplication. This is a sample application that will show you how to
462+
use the library and allow you to test connectivity to your database if you are having issues during your development with the library
463+
464+
In the root of the demo application module there is a file called test_data.sql which you can import
465+
in to your database and then provide the app your connection details to confirm that all is working as expected.

demoapplication/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

demoapplication/build.gradle

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 29
5+
6+
7+
defaultConfig {
8+
applicationId "com.boardiesitsolutions.demoapplication"
9+
minSdkVersion 19
10+
targetSdkVersion 29
11+
versionCode 1
12+
versionName "1.0"
13+
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15+
}
16+
17+
buildTypes {
18+
release {
19+
minifyEnabled false
20+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21+
}
22+
}
23+
24+
repositories {
25+
maven { url 'https://jitpack.io' }
26+
}
27+
}
28+
29+
dependencies {
30+
implementation fileTree(dir: 'libs', include: ['*.jar'])
31+
32+
implementation 'androidx.appcompat:appcompat:1.1.0'
33+
implementation 'com.github.BoardiesITSolutions:Android-MySQL-Connector:0.30_MySQL8'
34+
}

demoapplication/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.boardiesitsolutions.demoapplication">
3+
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
4+
<application
5+
android:allowBackup="true"
6+
android:icon="@mipmap/ic_launcher"
7+
android:label="@string/app_name"
8+
android:roundIcon="@mipmap/ic_launcher_round"
9+
android:supportsRtl="true"
10+
android:theme="@style/AppTheme">
11+
<activity android:name=".MainActivity">
12+
<intent-filter>
13+
<action android:name="android.intent.action.MAIN" />
14+
<category android:name="android.intent.category.LAUNCHER" />
15+
</intent-filter>
16+
</activity>
17+
</application>
18+
</manifest>

0 commit comments

Comments
 (0)