forked from mttkay/ignition
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add the submodules as proper folders
- Loading branch information
Showing
103 changed files
with
9,217 additions
and
3 deletions.
There are no files selected for viewing
Submodule ignition-core
deleted from
304ca8
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.github.ignition.core"> | ||
|
||
<uses-sdk android:minSdkVersion="4" /> | ||
|
||
<application> | ||
</application> | ||
</manifest> |
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,32 @@ | ||
// gradle-android plugin configuration | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
mavenRepo(urls: 'http://jvoegele.com/maven2/') | ||
} | ||
dependencies { | ||
//classpath 'com.jvoegele.gradle.plugins:android-plugin:1.0.0-SNAPSHOT' | ||
classpath 'com.jvoegele.gradle.plugins:gradle-android-plugin:1.1.0-SNAPSHOT' | ||
} | ||
} | ||
|
||
/////////////////////////////////////////////////////////////////////////////////// | ||
|
||
dependsOn(':ignition-support') | ||
|
||
apply plugin: 'android' | ||
apply plugin: 'eclipse' | ||
|
||
sourceSets { | ||
main { | ||
java { | ||
srcDir 'src' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile(project(':ignition-support')) { | ||
exclude module: 'android' | ||
} | ||
} |
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,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.github.ignition</groupId> | ||
<artifactId>ignition</artifactId> | ||
<version>0.1-SNAPSHOT</version> | ||
</parent> | ||
<groupId>com.github.ignition</groupId> | ||
<artifactId>ignition-core</artifactId> | ||
<packaging>apklib</packaging> | ||
<name>Ignition Core</name> | ||
<url>http://github.com/kaeppler/ignition-core</url> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>android</groupId> | ||
<artifactId>android</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>ignition-support</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>src</sourceDirectory> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.jayway.maven.plugins.android.generation2</groupId> | ||
<artifactId>android-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-eclipse-plugin</artifactId> | ||
<configuration> | ||
<excludes> | ||
<exclude>android:android</exclude> | ||
</excludes> | ||
<buildOutputDirectory>bin</buildOutputDirectory> | ||
<classpathContainers> | ||
<classpathContainer>com.android.ide.eclipse.adt.ANDROID_FRAMEWORK</classpathContainer> | ||
</classpathContainers> | ||
<additionalProjectnatures> | ||
<projectnature>com.android.ide.eclipse.adt.AndroidNature</projectnature> | ||
</additionalProjectnatures> | ||
<additionalBuildcommands> | ||
<buildcommand>com.android.ide.eclipse.adt.ResourceManagerBuilder</buildcommand> | ||
<buildcommand>com.android.ide.eclipse.adt.PreCompilerBuilder</buildcommand> | ||
<buildcommand>com.android.ide.eclipse.adt.ApkBuilder</buildcommand> | ||
</additionalBuildcommands> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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,12 @@ | ||
# This file is automatically generated by Android Tools. | ||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
# | ||
# This file must be checked in Version Control Systems. | ||
# | ||
# To customize properties used by the Ant build system use, | ||
# "ant.properties", and override values to adapt the script to your | ||
# project structure. | ||
|
||
android.library=true | ||
# Project target. | ||
target=android-4 |
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,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<declare-styleable name="com.github.ignition.core.widgets.HorizontalPager"> | ||
<attr name="pageWidth" format="dimension" /> | ||
</declare-styleable> | ||
|
||
<declare-styleable name="com.github.ignition.core.widgets.HorizontalPagerControl"> | ||
<attr name="barColor" format="color" /> | ||
<attr name="highlightColor" format="color" /> | ||
<attr name="fadeDelay" format="integer" /> | ||
<attr name="fadeDuration" format="integer" /> | ||
<attr name="roundRectRadius" format="dimension" /> | ||
</declare-styleable> | ||
|
||
</resources> |
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,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<item type="id" name="ign_horizontal_pager" /> | ||
<item type="id" name="ign_horizontal_pager_control" /> | ||
|
||
</resources> |
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="ign_error_report_email_subject">New error report: %s</string> | ||
<string name="ign_error_report_send_button">Send Email</string> | ||
|
||
</resources> |
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,22 @@ | ||
/* Copyright (c) 2009 Matthias Kaeppler | ||
* | ||
* 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. | ||
*/ | ||
|
||
package com.github.ignition.core; | ||
|
||
public interface Ignition { | ||
|
||
static final String XMLNS = "http://github.com/ignition/schema"; | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
ignition-core/src/com/github/ignition/core/activities/IgnitedActivities.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,45 @@ | ||
/* Copyright (c) 2009 Matthias Kaeppler | ||
* | ||
* 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. | ||
*/ | ||
|
||
package com.github.ignition.core.activities; | ||
|
||
import java.util.List; | ||
|
||
import android.app.ActivityManager; | ||
import android.app.ActivityManager.RunningTaskInfo; | ||
import android.content.ComponentName; | ||
import android.content.Context; | ||
|
||
public class IgnitedActivities { | ||
|
||
/** | ||
* Checks if the application is in the background (i.e behind another application's Activity). | ||
* | ||
* @param context | ||
* @return true if another application is above this one. | ||
*/ | ||
public static boolean isApplicationBroughtToBackground(final Context context) { | ||
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); | ||
List<RunningTaskInfo> tasks = am.getRunningTasks(1); | ||
if (!tasks.isEmpty()) { | ||
ComponentName topActivity = tasks.get(0).topActivity; | ||
if (!topActivity.getPackageName().equals(context.getPackageName())) { | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
} |
Oops, something went wrong.