mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-04 00:13:20 +08:00
Merge github.com:phonegap/phonegap-android
This commit is contained in:
commit
648df2624f
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
|
||||||
package="com.phonegap" android:versionName="1.1" android:versionCode="5">
|
package="com.phonegap" android:versionName="1.1" android:versionCode="5">
|
||||||
<supports-screens
|
<supports-screens
|
||||||
android:largeScreens="true"
|
android:largeScreens="true"
|
||||||
|
@ -946,19 +946,38 @@ public class DroidGap extends PhonegapActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If sms:5551212
|
// If sms:5551212?body=This is the message
|
||||||
else if (url.startsWith("sms:")) {
|
else if (url.startsWith("sms:")) {
|
||||||
try {
|
try {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
intent.setData(Uri.parse(url));
|
|
||||||
intent.putExtra("address", url.substring(4));
|
// Get address
|
||||||
intent.setType("vnd.android-dir/mms-sms");
|
String address = null;
|
||||||
startActivity(intent);
|
int parmIndex = url.indexOf('?');
|
||||||
} catch (android.content.ActivityNotFoundException e) {
|
if (parmIndex == -1) {
|
||||||
System.out.println("Error sending sms "+url+":"+ e.toString());
|
address = url.substring(4);
|
||||||
}
|
}
|
||||||
return true;
|
else {
|
||||||
}
|
address = url.substring(4, parmIndex);
|
||||||
|
|
||||||
|
// If body, then set sms body
|
||||||
|
Uri uri = Uri.parse(url);
|
||||||
|
String query = uri.getQuery();
|
||||||
|
if (query != null) {
|
||||||
|
if (query.startsWith("body=")) {
|
||||||
|
intent.putExtra("sms_body", query.substring(5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intent.setData(Uri.parse("sms:"+address));
|
||||||
|
intent.putExtra("address", address);
|
||||||
|
intent.setType("vnd.android-dir/mms-sms");
|
||||||
|
startActivity(intent);
|
||||||
|
} catch (android.content.ActivityNotFoundException e) {
|
||||||
|
System.out.println("Error sending sms "+url+":"+ e.toString());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// All else
|
// All else
|
||||||
else {
|
else {
|
||||||
|
@ -21,7 +21,7 @@ class Classic
|
|||||||
def setup
|
def setup
|
||||||
@android_dir = File.expand_path(File.dirname(__FILE__).gsub(/lib$/,''))
|
@android_dir = File.expand_path(File.dirname(__FILE__).gsub(/lib$/,''))
|
||||||
@framework_dir = File.join(@android_dir, "framework")
|
@framework_dir = File.join(@android_dir, "framework")
|
||||||
@icon = File.join(@www, 'icon.png') unless File.exists?(@icon)
|
@icon = File.join(@www, 'icon.png') unless !@icon.nil? && File.exists?(@icon)
|
||||||
# Hash that stores the location of icons for each resolution type. Uses the default icon for all resolutions as a baseline.
|
# Hash that stores the location of icons for each resolution type. Uses the default icon for all resolutions as a baseline.
|
||||||
@icons = {
|
@icons = {
|
||||||
:"drawable-ldpi" => @icon,
|
:"drawable-ldpi" => @icon,
|
||||||
|
Loading…
Reference in New Issue
Block a user