Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
fix(Action-Error): Solve Android action error
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Apr 6, 2017
1 parent 88579aa commit a6ad692
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions urlhandler.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export function handleIntent(intent: any) {
application.android.on(application.AndroidApplication.activityCreatedEvent, (args) => {
let intent: android.content.Intent = args.activity.getIntent();
try {
if (new String(intent.getAction()).valueOf() === new String(android.content.Intent.ACTION_VIEW).valueOf()) {
if (new String(intent.getAction()).valueOf() === new String(android.content.Intent.ACTION_MAIN).valueOf()
|| new String(intent.getAction()).valueOf() === new String(android.content.Intent.ACTION_VIEW).valueOf()) {
handleIntent(intent);
}
} catch (e) {
Expand All @@ -35,7 +36,8 @@ application.android.on(application.AndroidApplication.activityCreatedEvent, (arg
application.android.on(application.AndroidApplication.activityResumedEvent, (args) => {
let intent: android.content.Intent = args.activity.getIntent();
try {
if (new String(intent.getAction()).valueOf() === new String(android.content.Intent.ACTION_VIEW).valueOf()) {
if (new String(intent.getAction()).valueOf() === new String(android.content.Intent.ACTION_MAIN).valueOf()
|| new String(intent.getAction()).valueOf() === new String(android.content.Intent.ACTION_VIEW).valueOf()) {
handleIntent(intent);
lastReceivedData = intent.getData();
}
Expand Down

0 comments on commit a6ad692

Please # to comment.