Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odakyuToiletSignage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kddi
odakyuToiletSignage
Commits
1040d40c
Commit
1040d40c
authored
Dec 28, 2017
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
端末の電源ONの時の自動アプリ起動できない問題対応
parent
5a707ad7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
app/src/main/java/jp/odakyu/toiletsignage/receiver/OnBootReceiver.java
+3
-4
No files found.
app/src/main/java/jp/odakyu/toiletsignage/receiver/OnBootReceiver.java
View file @
1040d40c
...
...
@@ -5,6 +5,7 @@ import android.content.Context;
import
android.content.Intent
;
import
jp.odakyu.toiletsignage.activity.MainActivity
;
import
jp.odakyu.toiletsignage.log.Logger
;
/**
* 端末の電源がONしたときに自動的にアプリを起動させるレシーバー
...
...
@@ -12,14 +13,12 @@ import jp.odakyu.toiletsignage.activity.MainActivity;
*/
public
class
OnBootReceiver
extends
BroadcastReceiver
{
public
static
final
String
TAG
=
"OnBootReceiver"
;
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
if
(
intent
.
getAction
().
equals
(
Intent
.
ACTION_BOOT_COMPLETED
))
{
if
(
intent
!=
null
)
{
Logger
.
i
(
TAG
,
"Power ON"
);
Intent
i
=
new
Intent
(
context
,
MainActivity
.
class
);
i
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
i
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment