This repository has been archived by the owner on May 12, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6def196
commit af7d5ef
Showing
29 changed files
with
226 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
ZionHighSchool/src/main/java/com/licubeclub/zionhs/AutoStarter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.licubeclub.zionhs; | ||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.ComponentName; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.util.Log; | ||
|
||
/** | ||
* Created by youngbin on 13. 12. 13. | ||
*/ | ||
public class AutoStarter extends BroadcastReceiver { | ||
public void onReceive(Context context, Intent intent) { | ||
Log.i("AutoStarter","AutoStarter is Running"); | ||
//Load notification toggle value from SharedPreferences | ||
boolean ToggleOn = context.getSharedPreferences("pref", Context.MODE_PRIVATE).getBoolean("toggledata", true); | ||
|
||
if(ToggleOn){ | ||
if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED")) { | ||
Log.i("BOOTSVC", "Intent received"); | ||
Log.i("AutoStarter","Starting ShakeDetectService"); | ||
ComponentName cn = new ComponentName(context.getPackageName(), ShakeDetectService.class.getName()); | ||
ComponentName svcName = context.startService(new Intent().setComponent(cn)); | ||
if (svcName == null) | ||
Log.i("AutoStarter","Cannot Start ShakeDetectService"); | ||
Log.e("BOOTSVC", "Could not start service " + cn.toString()); | ||
} | ||
} | ||
else{ | ||
//Do Nothing | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- Copyright 2013 Young Bin Han | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shareInterpolator="false"> | ||
<alpha xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:fromAlpha="0.0" | ||
android:toAlpha="1.0" | ||
/> | ||
<translate | ||
android:fromXDelta="100%" android:toXDelta="0%" | ||
android:fromYDelta="0%" android:toYDelta="0%" | ||
android:duration="@android:integer/config_mediumAnimTime" /> | ||
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shareInterpolator="false"> | ||
<alpha xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:fromAlpha="0.0" | ||
android:toAlpha="1.0" | ||
/> | ||
<translate | ||
android:fromXDelta="0%" android:toXDelta="0%" | ||
android:fromYDelta="100%" android:toYDelta="0%" | ||
android:duration="@android:integer/config_mediumAnimTime" /> | ||
</set> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.