Skip to content

Commit

Permalink
fully working now
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Lieder committed Apr 15, 2011
1 parent 6fa8604 commit 27652bd
Show file tree
Hide file tree
Showing 23 changed files with 923 additions and 1,371 deletions.
22 changes: 11 additions & 11 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="build/.apt_generated"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/Developer/android-sdk-mac_86/platforms/android-8/android.jar"/>
<classpathentry kind="lib" path="/Developer/android-sdk-mac_86/add-ons/addon_google_apis_google_inc_8/libs/maps.jar"/>
<classpathentry kind="lib" path="/Library/Application Support/Titanium/mobilesdk/osx/1.5.0/android/titanium.jar" sourcepath="/Users/findlaw/Git/titanium_mobile/android/titanium/src"/>
<classpathentry kind="lib" path="/Library/Application Support/Titanium/mobilesdk/osx/1.5.0/android/js.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="build/.apt_generated"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/Developer/android-sdk-mac_86/platforms/android-8/android.jar"/>
<classpathentry kind="lib" path="/Developer/android-sdk-mac_86/add-ons/addon_google_apis_google_inc_8/libs/maps.jar"/>
<classpathentry kind="lib" path="/Library/Application Support/Titanium/mobilesdk/osx/1.5.0/android/titanium.jar" sourcepath="/Users/findlaw/Git/titanium_mobile/android/titanium/src"/>
<classpathentry kind="lib" path="/Library/Application Support/Titanium/mobilesdk/osx/1.5.0/android/js.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
34 changes: 17 additions & 17 deletions .project
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>titanium-c2dm</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>titanium-c2dm</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
14 changes: 7 additions & 7 deletions .settings/org.eclipse.jdt.apt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Thu Sep 02 15:18:34 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=.apt_generated
org.eclipse.jdt.apt.reconcileEnabled=true

org.eclipse.jdt.apt.processorOptions/kroll.jsonFile=c2dm.json
#Thu Sep 02 15:18:34 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=.apt_generated
org.eclipse.jdt.apt.reconcileEnabled=true

org.eclipse.jdt.apt.processorOptions/kroll.jsonFile=c2dm.json
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Thu Sep 02 15:18:34 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.processAnnotations=enabled
#Thu Sep 02 15:18:34 CDT 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.processAnnotations=enabled
503 changes: 1 addition & 502 deletions LICENSE

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions assets/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Place your assets like PNG files in this directory and they will be packaged with your module.

If you create a file named com.findlaw.titanium.c2dm.js in this directory, it will be
compiled and used as your module. This allows you to run pure Javascript
modules that are pre-compiled.

Place your assets like PNG files in this directory and they will be packaged with your module.
If you create a file named com.findlaw.titanium.c2dm.js in this directory, it will be
compiled and used as your module. This allows you to run pure Javascript
modules that are pre-compiled.
6 changes: 3 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
titanium.platform=/Library/Application Support/Titanium/mobilesdk/osx/1.5.0/android
android.platform=/opt/android-sdk/platforms/android-8
google.apis=/opt/android-sdk/add-ons/addon_google_apis_google_inc_8
titanium.platform=C:\\Users\\All Users\\Titanium\\mobilesdk\\win32\\1.6.1\\android
android.platform=C:\\Tools\\android-sdk-windows\\platforms\\android-8
google.apis=C:\\Tools\\android-sdk-windows\\add-ons\\addon_google_apis_google_inc_8
20 changes: 10 additions & 10 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<project name="c2dm" default="dist">
<description>
Ant build script for Titanium Android module c2dm
</description>

<property name="ti.module.root" location="${basedir}"/>
<property file="build.properties" />

<import file="${titanium.platform}/../module/android/build.xml"/>
</project>
<project name="c2dm" default="dist">
<description>
Ant build script for Titanium Android module c2dm
</description>

<property name="ti.module.root" location="${basedir}"/>
<property file="build.properties" />

<import file="${titanium.platform}/../module/android/build.xml"/>
</project>
78 changes: 39 additions & 39 deletions documentation/index.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# c2dm Module

## Description

TODO: Enter your module description here

## Accessing the c2dm Module

To access this module from JavaScript, you would do the following:

var c2dm = require("com.findlaw.titanium.c2dm");

The c2dm variable is a reference to the Module object.

## Reference

TODO: If your module has an API, you should document
the reference here.

### ___PROJECTNAMEASIDENTIFIER__.function

TODO: This is an example of a module function.

### ___PROJECTNAMEASIDENTIFIER__.property

TODO: This is an example of a module property.

## Usage

TODO: Enter your usage example here

## Author

TODO: Enter your author name, email and other contact
details you want to share here.

## License

TODO: Enter your license/legal information here.
# c2dm Module

## Description

TODO: Enter your module description here

## Accessing the c2dm Module

To access this module from JavaScript, you would do the following:

var c2dm = require("com.findlaw.titanium.c2dm");

The c2dm variable is a reference to the Module object.

## Reference

TODO: If your module has an API, you should document
the reference here.

### ___PROJECTNAMEASIDENTIFIER__.function

TODO: This is an example of a module function.

### ___PROJECTNAMEASIDENTIFIER__.property

TODO: This is an example of a module property.

## Usage

TODO: Enter your usage example here

## Author

TODO: Enter your author name, email and other contact
details you want to share here.

## License

TODO: Enter your license/legal information here.
166 changes: 92 additions & 74 deletions example/AndroidManifest.custom.xml
Original file line number Diff line number Diff line change
@@ -1,75 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.findlaw.titanium.c2dm"
android:versionCode="1"
android:versionName="1"
>
<uses-sdk android:minSdkVersion="4" />

<supports-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="false"
/>

<application
android:icon="@drawable/appicon"
android:label="c2dm"
android:name="C2dmApplication"
android:debuggable="false"
>
<activity
android:name=".C2dmActivity"
android:label="c2dm"
android:theme="@style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>


<activity
android:name="org.appcelerator.titanium.TiActivity"
android:configChanges="keyboardHidden|orientation"
/>
<activity android:name="org.appcelerator.titanium.TiModalActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
/>
<activity android:name="ti.modules.titanium.ui.TiTabActivity"
android:configChanges="keyboardHidden|orientation"
/>
<activity android:name="ti.modules.titanium.media.TiVideoActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
/>

<service
android:name="org.appcelerator.titanium.analytics.TiAnalyticsService"
android:exported="false"
/>



</application>

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>


<permission android:name="com.findlaw.titanium.c2dm.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.findlaw.titanium.c2dm.permission.C2D_MESSAGE" />

<!-- This app has permission to register and receive message -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<!-- Send the registration id to the server -->
<uses-permission android:name="android.permission.INTERNET" />

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.findlaw.titanium.c2dm"
android:versionCode="1"
android:versionName="1"
>
<uses-sdk android:minSdkVersion="4" />

<supports-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="false"
/>

<application
android:icon="@drawable/appicon"
android:label="c2dm"
android:name="C2dmApplication"
android:debuggable="false"
>
<activity
android:name=".C2dmActivity"
android:label="c2dm"
android:theme="@style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>


<activity
android:name="org.appcelerator.titanium.TiActivity"
android:configChanges="keyboardHidden|orientation"
/>
<activity android:name="org.appcelerator.titanium.TiModalActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
/>
<activity android:name="ti.modules.titanium.ui.TiTabActivity"
android:configChanges="keyboardHidden|orientation"
/>
<activity android:name="ti.modules.titanium.media.TiVideoActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
/>

<service
android:name="org.appcelerator.titanium.analytics.TiAnalyticsService"
android:exported="false"
/>

<service android:name=".C2DMReceiver" />

<!-- Only google service can send data messages for the app. If permission is not set -
any other app can generate it -->
<receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.findlaw.titanium.c2dm" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.findlaw.titanium.c2dm" />
</intent-filter>
</receiver>

</application>

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>


<permission android:name="com.findlaw.titanium.c2dm.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.findlaw.titanium.c2dm.permission.C2D_MESSAGE" />

<!-- This app has permission to register and receive message -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<!-- Send the registration id to the server -->
<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.WAKE_LOCK" />

</manifest>
Loading

0 comments on commit 27652bd

Please sign in to comment.