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

[Dev App] Adding some misc buttons for development and testing #1955

Open
wants to merge 305 commits into
base: main
Choose a base branch
from

Conversation

nan-li
Copy link
Contributor

@nan-li nan-li commented Jan 7, 2024

Description

One Line Summary

Add 3 buttons to the Dev App that can be used in the development process,

Details

Motivation

  • During development, we may want to run certain code in the example app with the tap of a button.
  • It is a bit tedious to add buttons to the demo app each time, or have to use an existing button and modify its code.

Solution:

  • Add 3 buttons that can be used during development and testing. Just modify the buttons to do what you want it to do.
  • To use, go to MainActivityViewModel.java and look for the buttons named miscButton1, miscButton2, and miscButton3.

Scope

Dev App

Testing

Unit testing

None, not needed for dev app

Manual testing

  • Android emulator with API 33
  • Tested using these 3 buttons to log certain information while making a fix for optIn

Screenshot 2024-01-07 at 2 50 53 PM

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

brismithers and others added 30 commits January 18, 2023 09:08
* Update ApplicationService to more accurately detect when the app goes in/out of focus
* Always switch to main thread for RequestPermission calls, to ensure that (1) a suspend occurs and (2) any UI operations happen on the main thread.
* Add ToJsonObject to NotificationClickResult, NotificationAction, and InAppMessageClickResult.
* Expose groupedNotifications in INotification
[User Model] Application Focus and Threading
[User Model] Provide serialization mechanism for external classes
* Rebuild new user when an operation indicates the current user is no longer found.
* Properly handle all response status codes.
[User Model] Successfully recover from failing operations
…ader

[User Model] Add "OneSignal-Subscription-Id" header to requests
* Support transfer of subscription on user create which allows proper transfer even if there is no token.
* Allow optIn to drive permission even if already opted in
* Align API to native iOS
* On initialization, check for old player_id and build local user as required
* New LoginUserFromSubscriptionOperation and execution to support converting a local user to the user that owns a subscription.
…api-align

[User Model] Transfer Subscription on user create
[User Model] Support migrating user from SDK 4.x to SDK 5.x
[User Model] Fix broken unit test compilation
[User Model] Add validation logic to add/remove email & sms subscriptions
* Add new logo to example app
* Set `SDK-Wrapper` header based on new OneSignalWrapper interface, to be set by wrapper SDKs.
* Remove `clickId` and `pageId` from IInAppMessageAction, these should not be public.
* Rework IAM dismiss flow so close button will drive click handler.
* Drive re-evaluation of IAMs when IInAppMessageManager.paused is set to true.
* Change INotificationsManager removeNotification functions to no longer be suspending functions.
* Fix issue where notification received callbacks taking longer than 30 seconds would still be waited for.
…d-influences

[User Model] Properly set `isUnattributedEnabled` to config when specified in the params
…-settable

[User Model] Make `sdkVersion` in OneSignalWrapper settable.
[User Model] Expose `INotification.rawPayload`
…ing permissions. Detection requires persistence to preferences, which allows the addition of INotificationsManager.canRequestPermission.
jennantilla and others added 16 commits December 13, 2023 14:33
…ion_lib

Fix: Catch IllegalStateException on call to Google's location library
Since isShared now defaults to false, remove early return and add logging to update isShared to true.
- Change log to warn vs. error
- Access and save to constant PREFS_OS_LOCATION_SHARED
Fix: Update startGetLocation to only run if location is shared
Add getter for onesignalId and UserStateObserver
Require developers to add ACCESS_COARSE_LOCATION to their AndroidManifest themselves. This is done to avoid the location permission requirement for those who use the com.onesignal:OneSignal package like our wrapper SDKs. This change reverts back to the player model behaviour
Make it clear that developers have to add the access location permission to their AndroidManifest for the location module to work
Remove ACCESS_COARSE_LOCATION permission
Motivation:
It is a bit tedious to add buttons to the demo app to facilitate development and testing.

Solution:
Add 3 buttons that can be used during development and testing. Just modify the buttons to do what you want it to do.
Pushing this commit to test the CI for the PR.
@jinliu9508 jinliu9508 deleted the branch main January 31, 2024 21:21
@jinliu9508 jinliu9508 closed this Jan 31, 2024
@nan-li nan-li reopened this Jan 31, 2024
@jinliu9508 jinliu9508 force-pushed the user-model/main branch 3 times, most recently from 2072eac to d73bfc6 Compare February 6, 2024 16:38
Base automatically changed from user-model/main to main February 6, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants