Skip to content

mjgasior/cracker_mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cracker app logo

cracker_mobile

"Crack Kraków with the Cracker app!"

Big thanks to :octocat: mmBs for time and advice. 👏

Setup:

  1. You first need to define certain Dart environment variables:
    • AUTH0_DOMAIN - the domain address of your Auth0 account
    • AUTH0_CLIENT_ID - the client ID of your mobile app from Auth0 Detailed instruction on how to define --dart-define arguments you can find here.
  2. Please remember to turn on the Refresh Token Rotation and Refresh Token Expiration options in Auth0 (as described here) which make sure that a stolen refresh token is not used multiple times.

If you plan to edit the localization files present in lib/l10n which are of ARB (Application Resource Bundle) format, it would be a good idea to get a special IDE plugin which understands how to format such files.

  1. Before running the app you will need Google Maps API key.
  2. After you get it, go to android directory and find the autogenerated local.properties file.
  3. Add a new line with your API key in a format like this google.mapsApiKey=YOUR_API_KEY.

Release:

  1. Remember to turn off your emulator before you start the installation on a mobile device.
  2. To release the app for Android device just run flutter build apk --release.
  3. The apk file should be present in cracker-mobile-flutter\build\app\outputs\flutter-apk directory with the app-release.apk name.
  4. Download the SDK Platform Tools from Android Developers website. It includes the adb tool, that is Android Debug Bridge. Extract the contents of this ZIP file into an easily accessible folder (such as C:\adb).
  5. Turn on the USB debug mode on you phone. Usually you can start with tapping multiple times on the version in settings section, what unlocks the {} Developer options section. There you can find an switch which will allow USB debugging.
  6. Open Powershell, Git Shell or any of those in the directory where the adb.exe is and run ./adb.exe devices. Your device should be listed.
  7. Copy the .apk file to the directory where the adb.exe file is and run ./adb.exe install app-release.apk.
  8. After the adb console returns a message as below, the app should be available on your phone:
PS C:\android\platform-tools> .\adb.exe install cracker.apk
Performing Streamed Install
Success

Snippets:

  • flutter pub run build_runner build --delete-conflicting-outputs - force generation of the JSON deserialization files

Packages:

  • build_runner - provides a concrete way of generating files using Dart code (used to generate JSON deserialization class files in json_serializable)
  • flutter_appauth - a well-maintained wrapper package around AppAuth for Flutter developed by Michael Bui. AppAuth authenticates and authorizes users and supports the PKCE extension
  • (not yet migrated) flutter_localizations - package that specifies additional MaterialApp properties that include localization
  • flutter_secure_storage - library to securely persist data locally
  • (not yet migrated) geolocator - geolocation plugin which provides easy access to platform specific location services (FusedLocationProviderClient or if not available the LocationManager on Android and CLLocationManager on iOS)
  • (not yet migrated) google_maps_flutter - plugin that provides a Google Maps widget
  • graphql-flutter - a package based on Apollo GraphQL client that allows an integration with a GraphQL server in Flutter
  • http - a composable, Future-based library for making HTTP requests published by the Dart Team
  • json_annotation - defines the annotations used by json_serializable to create code for JSON serialization and deserialization
  • json_serializable - it is used to generate a class that allows deserialization of a JSON to a Dart class object by annotating it with @JsonSerializable and using the build_runner to autogenerate a class file

Resources:

About

Cracker mobile client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages