commit 7bac7e545207cd3f62ff24ec3892962be70ad1c2 Author: Joshua Sigona Date: Sat Jun 12 13:20:32 2021 +0900 Created GPS functionality and basic image import diff --git a/AndroidResources/res/mipmap-anydpi-v26/ic_launcher.xml b/AndroidResources/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/AndroidResources/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/AndroidResources/res/mipmap-hdpi/ic_launcher.png b/AndroidResources/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..00d8155 Binary files /dev/null and b/AndroidResources/res/mipmap-hdpi/ic_launcher.png differ diff --git a/AndroidResources/res/mipmap-hdpi/ic_launcher_foreground.png b/AndroidResources/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..e59e834 Binary files /dev/null and b/AndroidResources/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/AndroidResources/res/mipmap-mdpi/ic_launcher.png b/AndroidResources/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..b698936 Binary files /dev/null and b/AndroidResources/res/mipmap-mdpi/ic_launcher.png differ diff --git a/AndroidResources/res/mipmap-mdpi/ic_launcher_foreground.png b/AndroidResources/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..0248230 Binary files /dev/null and b/AndroidResources/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/AndroidResources/res/mipmap-xhdpi/ic_launcher.png b/AndroidResources/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..de9b007 Binary files /dev/null and b/AndroidResources/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/AndroidResources/res/mipmap-xhdpi/ic_launcher_foreground.png b/AndroidResources/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..1b524ae Binary files /dev/null and b/AndroidResources/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/AndroidResources/res/mipmap-xxhdpi/ic_launcher.png b/AndroidResources/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d09f0d9 Binary files /dev/null and b/AndroidResources/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/AndroidResources/res/mipmap-xxhdpi/ic_launcher_foreground.png b/AndroidResources/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..79e5a74 Binary files /dev/null and b/AndroidResources/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/AndroidResources/res/mipmap-xxxhdpi/ic_launcher.png b/AndroidResources/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..850ddc2 Binary files /dev/null and b/AndroidResources/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/AndroidResources/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/AndroidResources/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..76b589b Binary files /dev/null and b/AndroidResources/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/AndroidResources/res/values/values.xml b/AndroidResources/res/values/values.xml new file mode 100644 index 0000000..3533153 --- /dev/null +++ b/AndroidResources/res/values/values.xml @@ -0,0 +1,4 @@ + + + #e2e2e2 + diff --git a/Icon.png b/Icon.png new file mode 100644 index 0000000..517e663 Binary files /dev/null and b/Icon.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Contents.json b/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..477b25b --- /dev/null +++ b/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,108 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-40.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-58.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-87.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-80.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-120.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-180.png", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-152.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-167.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-1024.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000..f62c818 Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-120.png b/Images.xcassets/AppIcon.appiconset/Icon-120.png new file mode 100644 index 0000000..9272f16 Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-120.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-152.png b/Images.xcassets/AppIcon.appiconset/Icon-152.png new file mode 100644 index 0000000..df58a7b Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-152.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-167.png b/Images.xcassets/AppIcon.appiconset/Icon-167.png new file mode 100644 index 0000000..137dbac Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-167.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-180.png b/Images.xcassets/AppIcon.appiconset/Icon-180.png new file mode 100644 index 0000000..40fa8e3 Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-180.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-40.png b/Images.xcassets/AppIcon.appiconset/Icon-40.png new file mode 100644 index 0000000..a53cda3 Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-40.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-58.png b/Images.xcassets/AppIcon.appiconset/Icon-58.png new file mode 100644 index 0000000..76ef3f6 Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-58.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-76.png b/Images.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 0000000..7fed12e Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-80.png b/Images.xcassets/AppIcon.appiconset/Icon-80.png new file mode 100644 index 0000000..b06a11f Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-80.png differ diff --git a/Images.xcassets/AppIcon.appiconset/Icon-87.png b/Images.xcassets/AppIcon.appiconset/Icon-87.png new file mode 100644 index 0000000..ea59b45 Binary files /dev/null and b/Images.xcassets/AppIcon.appiconset/Icon-87.png differ diff --git a/Images.xcassets/Contents.json b/Images.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib b/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib new file mode 100644 index 0000000..351e482 Binary files /dev/null and b/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib differ diff --git a/LaunchScreen.storyboardc/Info.plist b/LaunchScreen.storyboardc/Info.plist new file mode 100644 index 0000000..32288e8 Binary files /dev/null and b/LaunchScreen.storyboardc/Info.plist differ diff --git a/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib b/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib new file mode 100644 index 0000000..48a7d93 Binary files /dev/null and b/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib differ diff --git a/LaunchScreen.storyboardc/designable.storyboard b/LaunchScreen.storyboardc/designable.storyboard new file mode 100644 index 0000000..cca8ab4 --- /dev/null +++ b/LaunchScreen.storyboardc/designable.storyboard @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/background.png b/background.png new file mode 100644 index 0000000..ccc1be5 Binary files /dev/null and b/background.png differ diff --git a/build.settings b/build.settings new file mode 100644 index 0000000..ec0d915 --- /dev/null +++ b/build.settings @@ -0,0 +1,61 @@ +-- +-- For more information on build.settings, see the Project Build Settings guide at: +-- https://docs.coronalabs.com/guide/distribution/buildSettings +-- + +settings = +{ + orientation = + { + -- Supported values for orientation: + -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight + default = "portrait", + supported = { "portrait", }, + }, + + -- + -- Android section + -- + android = + { + usesPermissions = + { + "android.permission.INTERNET", + -- Permission to retrieve current location from the GPS + "android.permission.ACCESS_FINE_LOCATION", + -- Permission to retrieve current location from WiFi or cellular service + "android.permission.ACCESS_COARSE_LOCATION",+ + }, + }, + + -- + -- iOS section + -- + iphone = + { + xcassets = "Images.xcassets", + plist = + { + UIStatusBarHidden = false, + UILaunchStoryboardName = "LaunchScreen", + }, + }, + + -- + -- Plugins section + -- + plugins = + { + + }, + + -- + -- Project section + -- + excludeFiles = + { + -- Exclude unnecessary files for each platform + all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", }, + android = { "LaunchScreen.storyboardc", }, + }, +} diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..629e3b4 --- /dev/null +++ b/config.lua @@ -0,0 +1,23 @@ +-- +-- For more information on config.lua see the Project Configuration Guide at: +-- https://docs.coronalabs.com/guide/basics/configSettings +-- + +application = +{ + content = + { + width = 320, + height = 480, + scale = "letterbox", + fps = 60, + + --[[ + imageSuffix = + { + ["@2x"] = 2, + ["@4x"] = 4, + }, + --]] + }, +} diff --git a/main.lua b/main.lua new file mode 100644 index 0000000..79db0a5 --- /dev/null +++ b/main.lua @@ -0,0 +1,38 @@ +----------------------------------------------------------------------------------------- +-- +-- main.lua +-- +----------------------------------------------------------------------------------------- + +local latitude = display.newText( "-", 100, 50, native.systemFont, 16 ) +local longitude = display.newText( "-", 100, 100, native.systemFont, 16 ) +local altitude = display.newText( "-", 100, 150, native.systemFont, 16 ) +local accuracy = display.newText( "-", 100, 200, native.systemFont, 16 ) +local speed = display.newText( "-", 100, 250, native.systemFont, 16 ) +local direction = display.newText( "-", 100, 300, native.systemFont, 16 ) +local time = display.newText( "-", 100, 350, native.systemFont, 16 ) + +local locationHandler = function( event ) + if ( event.errorCode ) then + native.showAlert( "GPS Location Error", event.errorMessage, {"OK"} ) + print( "Location error: " .. tostring( event.errorMessage ) ) + else + local latitudeText = string.format( '%.4f', event.latitude ) + latitude.text = latitudeText + local longitudeText = string.format( '%.4f', event.longitude ) + longitude.text = longitudeText + local altitudeText = string.format( '%.3f', event.altitude ) + altitude.text = altitudeText + local accuracyText = string.format( '%.3f', event.accuracy ) + accuracy.text = accuracyText + local speedText = string.format( '%.3f', event.speed ) + speed.text = speedText + local directionText = string.format( '%.3f', event.direction ) + direction.text = directionText + local timeText = string.format( '%.0f', event.time ) + time.text = timeText + end +end + +-- Activate location listener +Runtime:addEventListener( "location", locationHandler ) \ No newline at end of file