Created
April 13, 2011 09:18
-
-
Save sergeich/917250 to your computer and use it in GitHub Desktop.
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Copyright (C) 2008 The Android Open Source Project | |
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. | |
--> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.android.email" | |
android:versionCode="230000" | |
android:versionName="2.3" | |
> | |
<application android:icon="@drawable/icon" android:label="@string/app_name" | |
android:name="Email"> | |
<!-- Main activity. It opens from launcher --> | |
<activity | |
android:name=".activity.Welcome"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> | |
<!-- This activity will be invoked on receiving Intents or from within app --> | |
<activity | |
android:name=".activity.MessageCompose" | |
android:label="@string/app_name" | |
android:enabled="false" | |
> | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW" /> | |
<action android:name="android.intent.action.SENDTO" /> | |
<data android:scheme="mailto" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
</intent-filter> | |
<intent-filter android:label="@string/app_name"> | |
<action android:name="android.intent.action.SEND" /> | |
<data android:mimeType="*/*" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
</intent-filter> | |
<intent-filter android:label="@string/app_name"> | |
<action android:name="android.intent.action.SEND_MULTIPLE" /> | |
<data android:mimeType="*/*" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
</intent-filter> | |
</activity> | |
</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
/* | |
* Copyright (C) 2008 The Android Open Source Project | |
* | |
* 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. | |
*/ | |
public class MessageCompose extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
// Initialization skipped | |
Intent intent = getIntent(); | |
mAction = intent.getAction(); | |
// Handle the various intents that launch the message composer | |
if (Intent.ACTION_VIEW.equals(mAction) | |
|| Intent.ACTION_SENDTO.equals(mAction) | |
|| Intent.ACTION_SEND.equals(mAction) | |
|| Intent.ACTION_SEND_MULTIPLE.equals(mAction)) { | |
} else { | |
// Otherwise, handle the internal cases (Message Composer invoked from within app) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment