Skip to content

Commit

Permalink
Re-add the submodules as proper folders
Browse files Browse the repository at this point in the history
  • Loading branch information
mttkay committed Jan 13, 2012
1 parent f3505ce commit 6ca3133
Show file tree
Hide file tree
Showing 103 changed files with 9,217 additions and 3 deletions.
1 change: 0 additions & 1 deletion ignition-core
Submodule ignition-core deleted from 304ca8
9 changes: 9 additions & 0 deletions ignition-core/AndroidManifest.xml
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>
32 changes: 32 additions & 0 deletions ignition-core/build.gradle
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'
}
}
59 changes: 59 additions & 0 deletions ignition-core/pom.xml
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>
12 changes: 12 additions & 0 deletions ignition-core/project.properties
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
16 changes: 16 additions & 0 deletions ignition-core/res/values/attrs.xml
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>
7 changes: 7 additions & 0 deletions ignition-core/res/values/ids.xml
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>
6 changes: 6 additions & 0 deletions ignition-core/res/values/strings.xml
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>
22 changes: 22 additions & 0 deletions ignition-core/src/com/github/ignition/core/Ignition.java
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";

}
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;
}
}
Loading

0 comments on commit 6ca3133

Please sign in to comment.