forked from UWICompSociety/fst_app_flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
1,481 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-14/" /> | ||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer" /> | ||
<classpathentry kind="output" path="bin/default" /> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>app</name> | ||
<comment>Project app created by Buildship.</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connection.project.dir=.. | ||
eclipse.preferences.version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,96 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http:https://schemas.android.com/apk/res/android" | ||
package="com.example.fst_app_flutter"> | ||
|
||
<!-- | ||
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use | ||
Google Maps Android API v2, but you must specify either coarse or fine | ||
location permissions for the "MyLocation" functionality. | ||
--> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
|
||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that | ||
<!-- | ||
io.flutter.app.FlutterApplication is an android.app.Application that | ||
calls FlutterMain.startInitialization(this); in its onCreate method. | ||
In most cases you can leave this as-is, but you if you want to provide | ||
additional functionality it is fine to subclass or reimplement | ||
FlutterApplication and put your custom class here. --> | ||
|
||
FlutterApplication and put your custom class here. | ||
--> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.READ_CONTACTS"/> | ||
<uses-permission android:name="android.permission.WRITE_CONTACTS"/> | ||
<uses-permission android:name="android.permission.READ_CONTACTS" /> | ||
<uses-permission android:name="android.permission.WRITE_CONTACTS" /> | ||
|
||
<application | ||
android:name="io.flutter.app.FlutterApplication" | ||
android:label="fst_app_flutter" | ||
android:icon="@mipmap/ic_launcher"> | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="fst_app_flutter"> | ||
|
||
<!-- | ||
The API key for Google Maps-based APIs is defined as a string resource. | ||
(See the file "res/values/google_maps_api.xml"). | ||
Note that the API key is linked to the encryption key used to sign the APK. | ||
You need a different API key for each encryption key, including the release key that is used to | ||
sign the APK for publishing. | ||
You can define the keys for the debug and release targets in src/debug/ and src/release/. | ||
--> | ||
|
||
|
||
<activity | ||
android:name=".MainActivity" | ||
android:launchMode="singleTop" | ||
android:theme="@style/LaunchTheme" | ||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||
android:hardwareAccelerated="true" | ||
android:launchMode="singleTop" | ||
android:theme="@style/LaunchTheme" | ||
android:windowSoftInputMode="adjustResize"> | ||
<!-- Specifies an Android theme to apply to this Activity as soon as | ||
|
||
<!-- | ||
Specifies an Android theme to apply to this Activity as soon as | ||
the Android process has started. This theme is visible to the user | ||
while the Flutter UI initializes. After that, this theme continues | ||
to determine the Window background behind the Flutter UI. --> | ||
to determine the Window background behind the Flutter UI. | ||
--> | ||
<meta-data | ||
android:name="io.flutter.embedding.android.NormalTheme" | ||
android:resource="@style/NormalTheme" | ||
/> | ||
<!-- Displays an Android View that continues showing the launch screen | ||
android:name="io.flutter.embedding.android.NormalTheme" | ||
android:resource="@style/NormalTheme" /> | ||
<!-- | ||
Displays an Android View that continues showing the launch screen | ||
Drawable until Flutter paints its first frame, then this splash | ||
screen fades out. A splash screen is useful to avoid any visual | ||
gap between the end of Android's launch screen and the painting of | ||
Flutter's first frame. --> | ||
Flutter's first frame. | ||
--> | ||
<meta-data | ||
android:name="io.flutter.embedding.android.SplashScreenDrawable" | ||
android:resource="@drawable/launch_background" | ||
/> | ||
android:name="io.flutter.embedding.android.SplashScreenDrawable" | ||
android:resource="@drawable/launch_background" /> | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<!-- Don't delete the meta-data below. | ||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | ||
<!-- | ||
Don't delete the meta-data below. | ||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java | ||
--> | ||
<meta-data | ||
android:name="flutterEmbedding" | ||
android:value="2" /> | ||
|
||
<provider | ||
android:name="androidx.core.content.FileProvider" | ||
android:authorities="${applicationId}.provider" | ||
android:exported="false" | ||
android:grantUriPermissions="true"> | ||
<meta-data | ||
android:name="android.support.FILE_PROVIDER_PATHS" | ||
android:resource="@xml/provider_paths"/> | ||
</provider> | ||
<provider | ||
android:name="androidx.core.content.FileProvider" | ||
android:authorities="${applicationId}.provider" | ||
android:exported="false" | ||
android:grantUriPermissions="true"> | ||
<meta-data | ||
android:name="android.support.FILE_PROVIDER_PATHS" | ||
android:resource="@xml/provider_paths" /> | ||
</provider> | ||
|
||
|
||
<meta-data android:name="com.google.android.geo.API_KEY" | ||
android:value="AIzaSyAwJJ4MCCEkmpR7AI7QlJxdtPwcQlHAu5k"/> | ||
</application> | ||
</manifest> | ||
|
||
</manifest> |
52 changes: 0 additions & 52 deletions
52
android/app/src/main/java/com.example.fst_app_flutter/MainActivity.java
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
android/app/src/main/java/com/example/fst_app_flutter/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.example.fst_app_flutter;/* | ||
Dart Java Kotlin Obj-C Swift | ||
null null null nil (NSNull when nested) nil | ||
bool java.lang.Boolean Boolean NSNumber numberWithBool: NSNumber(value: Bool) | ||
int java.lang.Integer Int NSNumber numberWithInt: NSNumber(value: Int32) | ||
int, 64 java.lang.Long Long NSNumber numberWithLong: NSNumber(value: Int) | ||
double java.lang.Double Double NSNumber numberWithDouble: NSNumber(value: Double) | ||
String java.lang.String String NSString String | ||
Uint8List byte[] ByteArray FlutterStandardTypedData typedDataWithBytes: FlutterStandardTypedData(bytes: Data) | ||
Int32List int[] IntArray FlutterStandardTypedData typedDataWithInt32: FlutterStandardTypedData(int32: Data) | ||
Int64List long[] LongArray FlutterStandardTypedData typedDataWithInt64: FlutterStandardTypedData(int64: Data) | ||
Float64List double[] DoubleArray FlutterStandardTypedData typedDataWithFloat64: FlutterStandardTypedData(float64: Data) | ||
List java.util.ArrayList List NSArray Array | ||
Map java.util.HashMap HashMap NSDictionary Dictionary | ||
*/ | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.example.fst_app_flutter.contact.NativeContact; | ||
|
||
import java.util.HashMap; | ||
|
||
import io.flutter.embedding.android.FlutterActivity; | ||
import io.flutter.embedding.engine.FlutterEngine; | ||
import io.flutter.plugin.common.MethodChannel; | ||
|
||
@SuppressWarnings("unchecked") | ||
public class MainActivity extends FlutterActivity { | ||
private static final String CHANNEL = "com.example.fst_app_flutter/native"; | ||
|
||
@Override | ||
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { | ||
super.configureFlutterEngine(flutterEngine); | ||
new MethodChannel(flutterEngine.getDartExecutor().getBinaryMessenger(), CHANNEL) | ||
.setMethodCallHandler((call, result) -> { | ||
if ("saveNatively".equals(call.method)) { | ||
try { | ||
NativeContact contact = new NativeContact((HashMap<String, Object>) call.arguments); | ||
contact.saveNatively(this); | ||
} catch (Exception e) { | ||
//System.out.println(e.getMessage()); | ||
} | ||
} else { | ||
result.notImplemented(); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Jun 23 08:50:38 CEST 2017 | ||
#Thu Aug 27 02:35:07 EST 2020 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\:https://services.gradle.org/distributions/gradle-5.6.2-all.zip | ||
distributionUrl=https\:https://services.gradle.org/distributions/gradle-6.3-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source 'https://github.com/CocoaPods/Specs.git' | ||
target 'Runner' do | ||
use_frameworks! | ||
pod 'GoogleMaps' | ||
end |
Oops, something went wrong.