Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add device syncing Ability #6

Merged
merged 222 commits into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
8b0b8ac
update 'cached_network_image' to work with latest version of flutter
irasekh3 Mar 2, 2020
b69e825
setup OneSignal library and dependency for Android
irasekh3 Mar 2, 2020
0155505
add support for getting notifications and use OneSignal. (preliminari…
irasekh3 Mar 2, 2020
138065c
add onesignal ios support based on their documentation. from build er…
irasekh3 Mar 8, 2020
3bb7fd4
temporarily remove vibration library as it was causing some build iss…
irasekh3 Mar 8, 2020
132dd46
update the app bundle id from 'dev.pseudorand.nullpass' to 'app.nullp…
irasekh3 Mar 8, 2020
33d82dc
setup 'services' directory and move notification to there
irasekh3 Mar 8, 2020
ae959a4
setup basic 'logging' service to print debug logs in a standard way
irasekh3 Mar 8, 2020
b72e762
set print statements to call the basic debug logger
irasekh3 Mar 8, 2020
8338d42
update capitalization in function name 'secretsListFromJsonString' ba…
irasekh3 Mar 8, 2020
d701999
fix '_SettingsState' class name capitalization based on dart formatting
irasekh3 Mar 8, 2020
27f58f2
add missing required 'message' attribute in instantiation of the secr…
irasekh3 Mar 8, 2020
f85dc16
make anonymous reload secret list function take in an appribute so as…
irasekh3 Mar 8, 2020
42ed60f
make 'SecretList' attribute 'loading' final as preferred by darts for…
irasekh3 Mar 8, 2020
3c33ab9
make the 'secret' attribute final in the 'SecretEdit' screen and make…
irasekh3 Mar 9, 2020
6bc2372
make the 'inEditor' attribute final in the 'SecretGenerate' as prefer…
irasekh3 Mar 9, 2020
10abac8
make the 'secret' attribute final in the 'SecretView' as preferred by…
irasekh3 Mar 9, 2020
eb47e5c
make the '_secretText' attribute final in the 'SecretPreview' as pref…
irasekh3 Mar 9, 2020
daf57d7
update capitalization of the class '_SecretSearchState'to match prefe…
irasekh3 Mar 9, 2020
ef949be
update capitalization of the class '_SecretListWidget'to match prefer…
irasekh3 Mar 9, 2020
9413cc2
remove unnecessary cast of an attribute to a string when the attribut…
irasekh3 Mar 9, 2020
530e1bb
update capitalization of the class '_SearchField' to match preferranc…
irasekh3 Mar 9, 2020
91d756a
make the '_onChanged' attribute final in the '_SearchField' widget as…
irasekh3 Mar 9, 2020
f89d083
make the '_tec' attribute final in the '_SearchField' widget as prefe…
irasekh3 Mar 9, 2020
d54fff3
add common widgets and screen for center loader progress bars
irasekh3 Mar 12, 2020
3ce33f6
add missing copyright to the logging.dart file
irasekh3 Mar 12, 2020
a4270e2
rename the 'notification' class to 'notificationManager' and update t…
irasekh3 Mar 12, 2020
324159f
remove no longer needed commented out debug assertion
irasekh3 Mar 12, 2020
52f75bb
create a class to represent the data displayed in the qr code for dat…
irasekh3 Mar 12, 2020
b2a3370
add qr code rendering screen with which also handles inbound messages…
irasekh3 Mar 12, 2020
e8161f0
update dart version dependency
irasekh3 Mar 12, 2020
0130879
add library for barcode scanner and ios and and android permissions
irasekh3 Mar 12, 2020
62e2a5c
add qr scanning screen which also handles the handshake messaging to …
irasekh3 Mar 12, 2020
ff34c28
add a screen for routing the flow for device syncing
irasekh3 Mar 12, 2020
54e78df
split out the secret model from the db and table services. This is to…
irasekh3 Mar 13, 2020
ff9edac
fix secret create timestamp (even though the timestamp is overwritten…
irasekh3 Mar 15, 2020
14ab39a
update NotificationType to make more sense as I build this out
irasekh3 Mar 15, 2020
21c5a5b
add a model to represent devices
irasekh3 Mar 15, 2020
9f1a9df
add a model to represent device syncing
irasekh3 Mar 15, 2020
3f63a4d
add a model to represent vaults
irasekh3 Mar 15, 2020
f60b16e
update the datastore structure to properly support multiple tables in…
irasekh3 Mar 15, 2020
db03105
update the datastore to support devices
irasekh3 Mar 15, 2020
479633c
update the datastore to support device sync records
irasekh3 Mar 15, 2020
04e7a83
add screen to view added / stored devices
irasekh3 Mar 15, 2020
aa72f3a
add screen to setup and update sync rules for a device
irasekh3 Mar 15, 2020
7c6b3be
remove no longer needed commented out code for validating that a nick…
irasekh3 Mar 15, 2020
111716b
remove no longer needed commented out subtitle
irasekh3 Mar 15, 2020
0170749
remove no longer needed commented out section title
irasekh3 Mar 15, 2020
4b3992e
update the app drawer to be able to navigate to the manage devices sc…
irasekh3 Mar 15, 2020
f2bac97
update the sync setup flow to create a Device object and move on to t…
irasekh3 Mar 15, 2020
8f2d361
remove no longer needed _syncFrom attribute
irasekh3 Mar 15, 2020
f3d2b0c
reorganize code so it makes sense logically and aligns with order in …
irasekh3 Mar 15, 2020
0731bf8
reorganize code and move secret screens under a 'secrets' directory i…
irasekh3 Mar 15, 2020
840ed28
upgrade flutter dependecy versions
irasekh3 Mar 15, 2020
d5bb8a5
add openpgp dependency to support encryption of messages between devi…
irasekh3 Mar 17, 2020
16288c4
add openpgp and generate pgp keypair on first time starting up the ap…
irasekh3 Mar 17, 2020
d58f8eb
add quick handlers for base64 encoding and decoding strings - to be u…
irasekh3 Mar 25, 2020
9ea340c
recreate the qrdata model to be slim and minimal but still ensure tha…
irasekh3 Mar 25, 2020
ad948ff
create a new 'syncRegistration' object for representing data as it is…
irasekh3 Mar 25, 2020
e96aaa0
update the encryption service so naming is more explicit about what t…
irasekh3 Mar 25, 2020
bc907b3
add check before trying to insert encryption keypair to ensure that t…
irasekh3 Mar 25, 2020
b1a46bc
add support to the notification object for splitting into and sending…
irasekh3 Mar 25, 2020
8084d6c
add a Step Four notification type to support the additional step in t…
irasekh3 Mar 25, 2020
989b6e6
add the necessary handler defaults and structure to support a fourth …
irasekh3 Mar 26, 2020
0f68c5d
add support functions for collecting chunks and combining them for fu…
irasekh3 Mar 26, 2020
ae8cb3d
send notifications chunked to meet the limits
irasekh3 Mar 26, 2020
2bf64d6
receive notifications chunked and add a switch statement for the four…
irasekh3 Mar 26, 2020
d334744
update the device qr code screen sync logic to support the new handsh…
irasekh3 Mar 26, 2020
e28ad56
update the device qr code screen ui to properly represent the new han…
irasekh3 Mar 26, 2020
7f2e805
update the scan qr code screen sync logic to support the new handshak…
irasekh3 Mar 26, 2020
e06f59c
remove old qrdata object that was replaced in the new model located i…
irasekh3 Mar 26, 2020
3ccc0b2
update the manage devices FAB for more descriptive quick access to th…
irasekh3 Mar 26, 2020
39063a4
update the main page of the app to show a loader while the encryption…
irasekh3 Mar 26, 2020
5b86dd1
update the vault model to represent a vault that secrets are tied to,…
irasekh3 Mar 26, 2020
fb0ff66
update the vault model to support the datastore service and be able t…
irasekh3 Mar 26, 2020
dd20b49
add a vault table to the database
irasekh3 Mar 26, 2020
7f4def5
add checks to the shared preferences to determine if the vaults table…
irasekh3 Mar 26, 2020
2223f72
fix vault table create sql to remove extra comma that was breaking build
irasekh3 Mar 26, 2020
64da0d3
update the isTrue to cover more scenarios other than just checking if…
irasekh3 Mar 27, 2020
4fe05db
fix error - when trying to insert a vault into the db if it doesn't y…
irasekh3 Mar 27, 2020
11f100f
fix error - when assuming that the response of the db will be a boole…
irasekh3 Mar 27, 2020
77e7e47
add a default vault to the device on first startup so that by default…
irasekh3 Mar 27, 2020
a095d98
remove unnecessary import
irasekh3 Mar 27, 2020
cb20a15
pass vaults and tags into the secret edit page from the secret view p…
irasekh3 Mar 27, 2020
2d56f43
create a common filter chip for styling purposes and consitency acros…
irasekh3 Mar 27, 2020
00e627d
add function to generate the list of vaults chip widgets that can be …
irasekh3 Mar 27, 2020
cdc6077
instantiate the necessary vault state class attributes
irasekh3 Mar 27, 2020
ca79568
setup the Vaults ListTile view to display the vaults chips
irasekh3 Mar 27, 2020
932ac71
add loading trigger to ensure that all vaults are pulled from the db …
irasekh3 Mar 27, 2020
fa69d79
setup support for creating a default vault if one does not exist - th…
irasekh3 Mar 27, 2020
7af9560
add a list tile to the settings screen to create a default vault if o…
irasekh3 Mar 27, 2020
1cf3702
create common functions for bulk exporting and importing data - needs…
irasekh3 Mar 27, 2020
2ef6276
use the common import / export functions importing and exporting secr…
irasekh3 Mar 27, 2020
7bc6165
update the delete all data function in settings to properly clear out…
irasekh3 Mar 27, 2020
500f1d8
add a null condition in case fetching the secrets and or vaults retur…
irasekh3 Mar 30, 2020
783fdc7
make the import data alert dialog in the settings screen more user fr…
irasekh3 Mar 30, 2020
f3b26bf
move the delete all data back to the bottom of the settings screen an…
irasekh3 Mar 30, 2020
a4f426c
create a screen for managing vaults - create, delete, update nickname…
irasekh3 Mar 30, 2020
d3d1678
add the material design icons for flutter to replace the community ma…
irasekh3 Mar 30, 2020
9f0ed4b
migrate all community based icons to the new material design icons pa…
irasekh3 Mar 30, 2020
2cbf91c
remove the community_material_icon package - all references and depen…
irasekh3 Mar 30, 2020
f5049cd
fix - the key for vaults was incorrect when generating secrets based …
irasekh3 Mar 30, 2020
0d888ba
add the manage vaults screen to the app drawer so that it can be navi…
irasekh3 Mar 30, 2020
2d2f4c4
call create default vault during intial app startup - when there is n…
irasekh3 Mar 30, 2020
12d92a2
make the default internal vault source id a constant f the Vault class
irasekh3 Mar 30, 2020
03b529d
update the podlock file
irasekh3 Mar 31, 2020
2fd668d
fix - update calls to bulk insert to pass in objects as map (string t…
irasekh3 Mar 31, 2020
f1f9b88
fix - since the encryption keys are stored in the secure storage and …
irasekh3 Mar 31, 2020
8454409
don't back up data or app contents - 1 because it should not be neede…
irasekh3 Mar 31, 2020
a5665be
update the DeviceType naming case to be a little more standard and ac…
irasekh3 Apr 1, 2020
7b55d7c
change Vault Source to Vault Manager to be able to determine who mana…
irasekh3 Apr 1, 2020
230e9d2
create a data store function to set a given vault as default within t…
irasekh3 Apr 1, 2020
9b771ed
set the default vault in the shared preferences after running an import
irasekh3 Apr 1, 2020
328b9ba
remove the default vault id from shared preferences when deleting all…
irasekh3 Apr 1, 2020
b263f91
formatting self update
irasekh3 Apr 1, 2020
1a368de
add support to the vault management screen to alter if a vault is def…
irasekh3 Apr 1, 2020
418a055
ensure that the default Vault returned is a string and not null (even…
irasekh3 Apr 1, 2020
0c5dee9
update the DeviceAccess enum values to be all uppercase as is standard
irasekh3 Apr 1, 2020
2eb9935
update the column name for sync from to be more descriptive and say s…
irasekh3 Apr 1, 2020
8cd1f43
add missing import of the common lib to be able to reference the shar…
irasekh3 Apr 1, 2020
27c7d68
add missing copyright to files
irasekh3 Apr 1, 2020
16cce82
add class attributes to better represent the new devicesync class - s…
irasekh3 Apr 2, 2020
01ec53d
add functions to generate the list of list of vaults that can be sync…
irasekh3 Apr 2, 2020
e4a818e
update the screen to use the new functions to generate the vault sync…
irasekh3 Apr 2, 2020
a6d0812
remove the no longer needed widget for generating the list of vaults …
irasekh3 Apr 2, 2020
3e86021
add a function to the manage devices screen to reload the list of dev…
irasekh3 Apr 2, 2020
0d0b26a
open device sync screen on click of the device to manage the device n…
irasekh3 Apr 2, 2020
2a1aa04
update the manage devices screen to reload the list of devices ater r…
irasekh3 Apr 2, 2020
f979e8b
fix missing devices sync table - add the create table command to the …
irasekh3 Apr 2, 2020
bdc770c
add/update datastore functions to get details around device syncs for…
irasekh3 Apr 2, 2020
78ecb8f
add missing typedef of an async function that takes in no params and …
irasekh3 Apr 2, 2020
07ab018
add proper handling of boolean parameter 'syncFromInternal' given tha…
irasekh3 Apr 2, 2020
4693e7e
fix devicesyncrules screen - the original and new syncs map was using…
irasekh3 Apr 2, 2020
bb964f4
fix devicesyncrules screen - when creating a new devicesync the devic…
irasekh3 Apr 2, 2020
9049a1a
if creation or update of the device was successful then make changes …
irasekh3 Apr 2, 2020
b815ccc
move the notification model from the `services` directory to the `mod…
irasekh3 Apr 2, 2020
a9431a5
align the icon buttons to the end so that externally managed vaults c…
irasekh3 Apr 6, 2020
04b220f
realign code based on formatting rules
irasekh3 Apr 6, 2020
f7f6a4a
only include the edit button if the vault is managed internally
irasekh3 Apr 6, 2020
9495bd8
display a subtitle detailing the fact that the vault is managed exter…
irasekh3 Apr 6, 2020
aef4770
create a new an enum for tracking the status of a device sync - i.e. …
irasekh3 Apr 6, 2020
a690285
add the new SyncStatus attribute of the device sync object as an attr…
irasekh3 Apr 7, 2020
f7622c7
update the mapping details for creating a Secret object from a Map to…
irasekh3 Apr 7, 2020
226e065
create a common function for printing a list of strings to a string
irasekh3 Apr 7, 2020
b53cb71
overwrite the secret to string function to print out a json like form…
irasekh3 Apr 7, 2020
5b16e38
add a Notification ID attributes to the notification to be able corre…
irasekh3 Apr 7, 2020
7e04a0c
update the title of the sync update response notification type to be …
irasekh3 Apr 7, 2020
f995889
create objects for representing data sent to a device during a data s…
irasekh3 Apr 7, 2020
4a0483b
remove unnecessary commented out code and comments
irasekh3 Apr 7, 2020
c8d434a
add support for deleting all syncs from a device - important for when…
irasekh3 Apr 7, 2020
18a7d31
fix the where clause in a db query to check for a bool value to be ~/…
irasekh3 Apr 7, 2020
9ff51ff
fix the columnSyncVaultId to be forced in the DB because it should n…
irasekh3 Apr 7, 2020
ce9ba04
add support for deleting the sync of a vault to/from an external device
irasekh3 Apr 7, 2020
0ce5758
add support for getting all secrets that live in a vault
irasekh3 Apr 7, 2020
d7461fb
update the delete vault functionality to also delete any secrets tied…
irasekh3 Apr 7, 2020
c8b4c08
update the functiondefinition for the in the - new format supports …
irasekh3 Apr 12, 2020
d853b13
edit the debug line in the notification handler to print out the deco…
irasekh3 Apr 12, 2020
a7cc77e
setup a default callback handler function for reading and handling sy…
irasekh3 Apr 12, 2020
6ce88a8
setup the notification manager to handle inbound (instead of the old …
irasekh3 Apr 12, 2020
dc2a61a
change the device (sync rules) edit screen to allow for deleting the …
irasekh3 Apr 12, 2020
ae82bd5
setup the construction of the notification and make the call to send …
irasekh3 Apr 12, 2020
36f7d84
add support for setting up a new device sync with add sync type
irasekh3 Apr 12, 2020
9f47643
add support for removing a device sync with add sync type
irasekh3 Apr 12, 2020
19a9194
add support for displaying the vaults that a secret is in
irasekh3 Apr 12, 2020
214af55
create a confirmation dialog in the secretView screen to ensure users…
irasekh3 Apr 12, 2020
3d196c2
update the screen so that only secrets that are managed internally c…
irasekh3 Apr 13, 2020
809c5e5
create a function for pulling the vault sync details for a given devi…
irasekh3 Apr 13, 2020
fe63525
create two functions for storing sync backups and retrieving them. cu…
irasekh3 Apr 13, 2020
618c882
create an object for representing updates to syncd vaults
irasekh3 Apr 13, 2020
d729259
update the sync details and send the new details to the syncd device
irasekh3 Apr 13, 2020
1d776cd
update the default sync data handler to also start supporting sync up…
irasekh3 Apr 13, 2020
f6d86bc
FIX delete empty vault not working - when trying to delete an empty v…
irasekh3 Apr 13, 2020
b2fc029
FIX sync update - if the existing sync has backup access and the new …
irasekh3 Apr 14, 2020
f7aa300
FIX sync remove - to also delete the backup and any data associated w…
irasekh3 Apr 14, 2020
7e18646
Cleanup code - separate out the sync type actions into their own func…
irasekh3 Apr 14, 2020
d63a8de
FIX add missing import
irasekh3 Apr 14, 2020
c590e05
FIX add missing datastore function for deleting sync backup data from…
irasekh3 Apr 14, 2020
24be373
FIX - add missing support for changing a sync type from Manage or Rea…
irasekh3 Apr 14, 2020
bea77ed
ADD - support for handling the sync type vault update and converting …
irasekh3 Apr 17, 2020
44c027c
ADD - support for sync types of data add/update/delete in the sync da…
irasekh3 Apr 17, 2020
7f04c40
[UPDATE] helper function names for syncing data / vaults to be more d…
irasekh3 Apr 17, 2020
f011969
[ADD] function to be able to get all device syncs tied to a vault in…
irasekh3 Apr 19, 2020
f8d1538
[ADD] sync data notification handler support for syncing new data or …
irasekh3 Apr 19, 2020
da117ac
[ADD] sync service for supporting sending notifications for changes -…
irasekh3 Apr 19, 2020
bb0b9f9
[ADD] when a secret is deleted call the sync service to send notifica…
irasekh3 Apr 19, 2020
4cde39a
[ADD] when a secret is added (created) or updated call the sync servi…
irasekh3 Apr 19, 2020
5b08940
[UPDATE] secret - add function to generate a clone
irasekh3 Apr 19, 2020
71e938c
[UPDATE] the manage syncs file
irasekh3 Apr 19, 2020
8799e26
[UPDATE] the device sync rules class to be a more fitting name - mana…
irasekh3 Apr 19, 2020
268a02f
[UPDATE] the device sync edit page so that it shows a center loader w…
irasekh3 Apr 19, 2020
448907e
[UPDATE] the device sync dependents to refer to the new file / class …
irasekh3 Apr 19, 2020
2aed945
[UPDATE] - move the router enum to be located with the app drawer (i.…
irasekh3 Apr 19, 2020
b99c195
[UPDATE] - organize the common.dart file so all defined types are tog…
irasekh3 Apr 19, 2020
6c0c017
[UPDATE] - since the initialize function for the one signal notificat…
irasekh3 Apr 20, 2020
7f2c617
[FIX] revert the accidental conversion of AppDrawer to a StatefulWidg…
irasekh3 Apr 20, 2020
8294d96
[FIX] - population of the created and last modified date time attribu…
irasekh3 Apr 23, 2020
cc85883
[ADD] a model for logging audit records
irasekh3 Apr 23, 2020
9d513be
[ADD] a db table for logging audit records
irasekh3 Apr 23, 2020
9393e17
[ADD] public datastore functions for retrieving the audit log - at th…
irasekh3 Apr 23, 2020
dfca080
[UPDATE] the audit record model - change the reference ID lists to be…
irasekh3 Apr 24, 2020
0cd1238
[ADD] auditRecords for common actions to the audit log including any …
irasekh3 Apr 24, 2020
46d5e56
[FIX] - incorrect instantiation of Sets to Lists
irasekh3 Apr 24, 2020
df88af4
[ADD] - a new screen for view the audit log information
irasekh3 Apr 24, 2020
c4902cc
[ADD] - a link to view the audit log in the app drawer
irasekh3 Apr 24, 2020
4a27367
[ADD] - a missing widget for text to be centered in the UI
irasekh3 Apr 24, 2020
bc41170
[UPDATE] - make the card view a little more spaced out and properly f…
irasekh3 Apr 26, 2020
89a1e7e
[FIX] - add missing timeline pubspec package for the audit timeline view
irasekh3 Apr 26, 2020
2027654
[ADD] - setup audit records for key background tasks like encryption …
irasekh3 Apr 26, 2020
e188da2
[ADD] - setup of shared pref / settings for letting users decide if t…
irasekh3 Apr 26, 2020
2ce0790
[FIX] - add missing AuditType for new app setup audit records
irasekh3 Apr 26, 2020
a36532e
[UPDATE] - the title element for the app specific settings was still …
irasekh3 Apr 26, 2020
299c619
Merge branch 'feature/audit_log' into feature/device_syncing
irasekh3 Apr 26, 2020
e7f259e
[UPDATE] - store the password preview font size as a shared preferenc…
irasekh3 Apr 26, 2020
042cab8
[FIX] - upgrade the url_launcher package version and use more explici…
irasekh3 Apr 26, 2020
1d497c1
[FIX] - make the update vault sync access dialog have clickable label…
irasekh3 Apr 26, 2020
f23ec12
[FIX] - try to make the access for each vault in the manage sync view…
irasekh3 Apr 26, 2020
d332a2f
[ADD] - setup verbose debug logging for OneSignal SDK when in running…
irasekh3 Apr 27, 2020
783059f
[FIX] - restructure how the onesignal device id is stored and referen…
irasekh3 Apr 27, 2020
6349cf8
[UPDATE] - swap out the Device Access enum to be a class so that 'Rea…
irasekh3 Apr 27, 2020
ea62813
support android v2 embedding (#5)
irasekh3 Jan 22, 2021
d619fad
[ADD] - add missing refence in the .gitignore file to the auto genera…
irasekh3 Jan 22, 2021
2bfecea
Merge branch 'dev' into feature/device_syncing in order to reconcile …
irasekh3 Jan 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/Flutter/Flutter.podspec
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

Expand Down
16 changes: 15 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
* Copyright (c) 2019 Pseudorand Development. All rights reserved.
*/

buildscript {
repositories {
// ...
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
// ...
// OneSignal-Gradle-Plugin
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.2, 0.99.99]'
}
}

apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand Down Expand Up @@ -44,7 +58,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dev.pseudorand.nullpass"
minSdkVersion 18
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
23 changes: 16 additions & 7 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="NullPass"
android:allowBackup="false"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand All @@ -22,18 +23,26 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<!-- Specify that the launch screen should continue being displayed -->
<!-- until Flutter renders its first frame. -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />

<!-- Theme to apply as soon as Flutter begins rendering frames -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.CAMERA" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@

package dev.pseudorand.nullpass

import android.os.Bundle
import android.view.WindowManager.LayoutParams
import io.flutter.embedding.android.FlutterActivity

import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
getWindow().addFlags(LayoutParams.FLAG_SECURE)
GeneratedPluginRegistrant.registerWith(this)
}
}
class MainActivity: FlutterActivity() { }
10 changes: 10 additions & 0 deletions android/app/src/main/res/drawable/normal_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Created by Ilan Rasekh on 2019/9/27
~ Copyright (c) 2019 Pseudorand Development. All rights reserved.
-->

<!-- Modify this file to customize your normal background -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
</layer-list>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- You can name this style whatever you'd like -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@drawable/normal_background</item>
</style>
</resources>
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
Expand Down
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableJetifier=true
android.useAndroidX=true
android.enableR8=true
Binary file modified assets/images/null_iosScaledDown_1500_Transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions ios/OneSignalNotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>OneSignalNotificationServiceExtension</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.usernotifications.service</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// NotificationService.swift
// OneSignalNotificationServiceExtension
// File contents implemented based off of https://documentation.onesignal.com/docs/flutter-sdk-setup
//
// Created by Ilan Rasekh on 3/1/20.
// Copyright © 2020 The Chromium Authors. All rights reserved.
//
import UserNotifications

import OneSignal

class NotificationService: UNNotificationServiceExtension {

var contentHandler: ((UNNotificationContent) -> Void)?
var receivedRequest: UNNotificationRequest!
var bestAttemptContent: UNMutableNotificationContent?

override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
self.receivedRequest = request;
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)

if let bestAttemptContent = bestAttemptContent {
OneSignal.didReceiveNotificationExtensionRequest(self.receivedRequest, with: self.bestAttemptContent)
contentHandler(bestAttemptContent)
}
}

override func serviceExtensionTimeWillExpire() {
// Called just before the extension will be terminated by the system.
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
OneSignal.serviceExtensionTimeWillExpireRequest(self.receivedRequest, with: self.bestAttemptContent)
contentHandler(bestAttemptContent)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.app.nullpass.ios.onesignal</string>
</array>
</dict>
</plist>
73 changes: 21 additions & 52 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Using a CDN with CocoaPods 1.7.2 or later can save a lot of time on pod installation, but it's experimental rather than the default.
# source 'https://cdn.cocoapods.org/'

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

Expand All @@ -13,65 +10,37 @@ project 'Runner', {
'Release' => :release,
}

def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

target 'Runner' do
use_frameworks!
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
flutter_ios_podfile_setup

# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
target 'Runner' do
use_frameworks!
use_modular_headers!

# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignal', '>= 2.9.3', '< 3.0'
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
flutter_additional_ios_build_settings(target)
end
end
Loading