rhodes 3.3.1 → 3.3.2.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/CHANGELOG +9 -2
  2. data/Manifest.txt +20 -0
  3. data/Rakefile +2 -1
  4. data/doc/build.txt +9 -3
  5. data/doc/configuration.txt +5 -1
  6. data/doc/device-caps.txt +112 -27
  7. data/doc/extensions.txt +0 -51
  8. data/doc/generator.txt +6 -0
  9. data/doc/rhom.txt +3 -0
  10. data/doc/simulator.txt +57 -17
  11. data/doc/ui.txt +24 -27
  12. data/installer/RHOELEMENTS-EULA.txt +295 -0
  13. data/installer/Rakefile +75 -49
  14. data/installer/rhostudio-moto.nsi +534 -0
  15. data/installer/rhostudio.nsi +13 -4
  16. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +3 -0
  17. data/lib/framework/rho/rhoapplication.rb +4 -0
  18. data/lib/framework/rho/rhoevent.rb +2 -3
  19. data/lib/framework/rho/rhoevent_c.rb +2 -2
  20. data/lib/framework/rho/rhofsconnector.rb +24 -2
  21. data/lib/framework/rhodes.rb +1 -1
  22. data/lib/framework/version.rb +1 -1
  23. data/lib/rhodes.rb +1 -1
  24. data/platform/android/Rhodes/AndroidManifest.xml +3 -3
  25. data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +164 -90
  26. data/platform/android/Rhodes/jni/src/signature.cpp +13 -3
  27. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +76 -34
  28. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +3 -4
  29. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +1 -1
  30. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +10 -2
  31. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java +0 -3
  32. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Callout.java +6 -5
  33. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +0 -1
  34. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +7 -1
  35. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +46 -6
  36. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +29 -1
  37. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +2 -0
  38. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +4 -0
  39. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +10 -2
  40. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +3 -2
  41. data/platform/android/build/android.rake +6 -27
  42. data/platform/android/build/androidcommon.rb +1 -1
  43. data/platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java +26 -0
  44. data/platform/iphone/Classes/AppManager/AppManager.h +1 -0
  45. data/platform/iphone/Classes/AppManager/AppManager.m +70 -12
  46. data/platform/iphone/Classes/Camera/PickImageDelegate.m +1 -1
  47. data/platform/iphone/Classes/Event/Event.m +38 -3
  48. data/platform/iphone/Classes/Rhodes.m +3 -2
  49. data/platform/iphone/Classes/Signature/SignatureDelegate.m +1 -1
  50. data/platform/iphone/Info.plist +1 -1
  51. data/platform/iphone/rbuild/iphone.rake +8 -8
  52. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
  53. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
  54. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
  55. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -0
  56. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/phonon.framework/Versions/4/phonon +0 -0
  57. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
  58. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
  59. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib +0 -0
  60. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib +0 -0
  61. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib +0 -0
  62. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib +0 -0
  63. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib +0 -0
  64. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib +0 -0
  65. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib +0 -0
  66. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib +0 -0
  67. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
  68. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
  69. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
  70. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
  71. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
  72. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/phonon_backend/libphonon_qt7.dylib +0 -0
  73. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib +0 -0
  74. data/platform/osx/bin/RhoSimulator/RhoSimulatorMac.zip +0 -0
  75. data/platform/osx/build/osx.rake +1 -1
  76. data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1 -1
  77. data/platform/shared/common/RhoConf.cpp +15 -6
  78. data/platform/shared/common/RhoConf.h +6 -1
  79. data/platform/shared/common/RhodesApp.cpp +19 -6
  80. data/platform/shared/common/RhodesApp.h +4 -2
  81. data/platform/shared/common/RhodesAppBase.cpp +18 -10
  82. data/platform/shared/common/RhodesAppBase.h +6 -3
  83. data/platform/shared/common/map/GeocodingMapEngine.h +2 -2
  84. data/platform/shared/logging/RhoLogConf.cpp +14 -8
  85. data/platform/shared/logging/RhoLogConf.h +1 -0
  86. data/platform/shared/net/HttpServer.cpp +15 -3
  87. data/platform/shared/net/HttpServer.h +2 -1
  88. data/platform/shared/qt/curl/curl.pro +1 -1
  89. data/platform/shared/qt/rhodes/QtMainWindow.h +1 -1
  90. data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +2 -2
  91. data/platform/shared/qt/rhodes/main.cpp +2 -1
  92. data/platform/shared/ruby/ext/rho/rhoruby.c +1 -0
  93. data/platform/shared/ruby/ext/rho/rhosupport.c +11 -1
  94. data/platform/shared/sync/SyncNotify.cpp +1 -2
  95. data/platform/shared/sync/SyncNotify.h +2 -2
  96. data/platform/shared/sync/SyncThread.cpp +27 -12
  97. data/platform/shared/sync/SyncThread.h +2 -0
  98. data/platform/shared/unzip/unzip.cpp +3 -2
  99. data/platform/win32/RhoSimulator/Microsoft.VC80.CRT.manifest +8 -0
  100. data/platform/win32/RhoSimulator/Microsoft.VC80.OpenMP.manifest +7 -0
  101. data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
  102. data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
  103. data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
  104. data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
  105. data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
  106. data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
  107. data/platform/win32/RhoSimulator/imageformats/qico4.dll +0 -0
  108. data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
  109. data/platform/win32/RhoSimulator/imageformats/qmng4.dll +0 -0
  110. data/platform/win32/RhoSimulator/imageformats/qsvg4.dll +0 -0
  111. data/platform/win32/RhoSimulator/imageformats/qtiff4.dll +0 -0
  112. data/platform/win32/RhoSimulator/libeay32.dll +0 -0
  113. data/platform/win32/RhoSimulator/msvcm80.dll +0 -0
  114. data/platform/win32/RhoSimulator/msvcp80.dll +0 -0
  115. data/platform/win32/RhoSimulator/msvcr80.dll +0 -0
  116. data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
  117. data/platform/win32/RhoSimulator/vcomp.dll +0 -0
  118. data/platform/wm/build/rhodes.nsi +316 -0
  119. data/platform/wm/build/wm.rake +57 -10
  120. data/platform/wm/rhodes/Rhodes.cpp +2 -1
  121. data/platform/wm/rhodes/rhodes.vcproj +2 -0
  122. data/platform/wm/tools/wmdc_connect.sln +20 -0
  123. data/platform/wm/tools/wmdc_connect/stdafx.cpp +27 -0
  124. data/platform/wm/tools/wmdc_connect/stdafx.h +35 -0
  125. data/platform/wm/tools/wmdc_connect/wmdc_connect.cpp +119 -0
  126. data/platform/wm/tools/wmdc_connect/wmdc_connect.vcproj +205 -0
  127. data/platform/wp7/RhoRubyExtGen/RhoAlert.cs +73 -0
  128. data/platform/wp7/RhoRubyExtGen/RhoRubyExtGen.csproj +1 -0
  129. data/platform/wp7/RhoRubyExtGen/RhoSyncEngine.cs +8 -8
  130. data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +47 -6
  131. data/platform/wp7/RhoRubyLib/RhoRuby.cs +8 -0
  132. data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +5 -0
  133. data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +5 -0
  134. data/platform/wp7/RhoRubyLib/common/RhoParams.cs +2 -1
  135. data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +58 -37
  136. data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +37 -0
  137. data/platform/wp7/RhoRubyLib/db/DBAttrManager.cs +63 -1
  138. data/platform/wp7/RhoRubyLib/db/IDBStorage.cs +2 -0
  139. data/platform/wp7/RhoRubyLib/db/SqliteStorage.cs +27 -0
  140. data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +2 -2
  141. data/platform/wp7/RhoRubyLib/net/NetRequest.cs +4 -3
  142. data/platform/wp7/RhoRubyLib/rubyext/RhoAlert.cs +160 -0
  143. data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +44 -12
  144. data/platform/wp7/RhoRubyLib/sync/ClientRegister.cs +4 -3
  145. data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +27 -32
  146. data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +31 -11
  147. data/platform/wp7/RhoRubyLib/sync/SyncProtocol_3.cs +6 -1
  148. data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +4 -0
  149. data/platform/wp7/RhoRubyLib/sync/SyncThread.cs +21 -15
  150. data/platform/wp7/build/wp.rake +6 -0
  151. data/rakefile.rb +2 -1
  152. data/res/build-tools/Coding4Fun.Phone.Controls.dll +0 -0
  153. data/res/build-tools/wmdc_connect.exe +0 -0
  154. data/res/generators/templates/spec/app/SpecRunner/index.erb +14 -13
  155. data/spec/phone_spec/app/spec/rhom_object_spec.rb +10 -1
  156. data/version +1 -1
  157. metadata +26 -4
@@ -25,9 +25,11 @@
25
25
  *------------------------------------------------------------------------*/
26
26
 
27
27
  #include "rhodes/JNIRhodes.h"
28
+ #include "rhodes/JNIRhoRuby.h"
28
29
 
29
30
  #include "rhodes/jni/com_rhomobile_rhodes_signature_Signature.h"
30
31
 
32
+ #include <common/rhoparams.h>
31
33
  #include <common/RhodesApp.h>
32
34
  #include "ruby/ext/rho/rhoruby.h"
33
35
 
@@ -44,14 +46,15 @@ RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_signature_Signature_callback
44
46
 
45
47
  RHO_GLOBAL void rho_signature_take(char* callback_url, rho_param* p)
46
48
  {
47
- ///*
49
+
48
50
  JNIEnv *env = jnienv();
49
51
  jclass cls = getJNIClass(RHODES_JAVA_CLASS_SIGNATURE);
50
52
  if (!cls) return;
51
- jmethodID mid = getJNIClassStaticMethod(env, cls, "takeSignature", "(Ljava/lang/String;Ljava/lang/String;)V");
53
+ jmethodID mid = getJNIClassStaticMethod(env, cls, "takeSignature", "(Ljava/lang/String;Ljava/lang/Object;)V");
52
54
  if (!mid) return;
53
55
  jhstring objCallback = rho_cast<jhstring>(callback_url);
54
56
 
57
+ /*
55
58
  char* image_format = 0;
56
59
  if (p)
57
60
  {
@@ -64,7 +67,14 @@ RHO_GLOBAL void rho_signature_take(char* callback_url, rho_param* p)
64
67
 
65
68
  jhstring objFormat = rho_cast<jhstring>(image_format);
66
69
  env->CallStaticVoidMethod(cls, mid, objCallback.get(), objFormat.get());
67
- //*/
70
+ */
71
+
72
+ jobject paramsObj = RhoValueConverter(env).createObject(p);
73
+ env->CallStaticVoidMethod(cls, mid, objCallback.get(), paramsObj);
74
+ env->DeleteLocalRef(paramsObj);
75
+
76
+
77
+
68
78
  }
69
79
 
70
80
  RHO_GLOBAL void rho_signature_visible(bool b, rho_param* p)
@@ -44,6 +44,7 @@ import com.rhomobile.rhodes.util.ContextFactory;
44
44
  public class RhoCryptImpl
45
45
  {
46
46
  private static final String TAG = "RhoCryptJava";
47
+ private static final boolean DEBUG = false;
47
48
 
48
49
  byte[] m_dbKeyData;
49
50
  String m_strDBPartition;
@@ -54,12 +55,28 @@ public class RhoCryptImpl
54
55
  private void readKeyFromStorage()
55
56
  {
56
57
  SharedPreferences settings = ContextFactory.getContext().getSharedPreferences( m_strPrefName, Context.MODE_PRIVATE);
57
- String strOldKey = settings.getString(m_strDBPartition, "");
58
- if ( strOldKey != null && strOldKey.length() > 0 )
59
- {
60
- m_dbKeyData = Base64.decode(strOldKey);//, Base64.DEFAULT);
61
- }
62
- }
58
+ String strOldKey = settings.getString(m_strDBPartition, "");
59
+ if (strOldKey != null && strOldKey.length() > 0)
60
+ {
61
+
62
+ m_dbKeyData = Base64.decode(strOldKey);//, Base64.DEFAULT);
63
+ Logger.I(TAG, "Key is successfully read from Shared Preferences");
64
+ if(DEBUG) {
65
+ Logger.I(TAG, "Key: " + dumpKey(m_dbKeyData));
66
+ Logger.I(TAG, "Encoded key: " + strOldKey);
67
+ }
68
+ } else {
69
+ Logger.I(TAG, "No key is found in Shared Preferences");
70
+ }
71
+ }
72
+
73
+ private static String dumpKey(byte[] key) {
74
+ StringBuffer buffer = new StringBuffer();
75
+ for(byte b:key) {
76
+ buffer.append(String.format("%x ", b));
77
+ }
78
+ return buffer.toString();
79
+ }
63
80
 
64
81
  private void generateNewKey()throws Exception
65
82
  {
@@ -68,15 +85,28 @@ public class RhoCryptImpl
68
85
  kgen.init(m_nKeyLenBit, sr);
69
86
  SecretKey skey = kgen.generateKey();
70
87
  m_dbKeyData = skey.getEncoded();
88
+ Logger.I(TAG, "New key is generated");
89
+ if(DEBUG)
90
+ Logger.I(TAG, "Key: " + dumpKey(m_dbKeyData));
71
91
  }
72
92
 
73
- private void writeKeyToStorage()
74
- {
75
- SharedPreferences settings = ContextFactory.getContext().getSharedPreferences(m_strPrefName, Context.MODE_PRIVATE);
76
- SharedPreferences.Editor editor = settings.edit();
77
- String strKey = Base64.encodeToString(m_dbKeyData, false);//, Base64.DEFAULT);
78
- editor.putString(m_strDBPartition, strKey );
79
- editor.commit();
93
+ private void writeKeyToStorage()
94
+ {
95
+ SharedPreferences settings = ContextFactory.getContext().getSharedPreferences(m_strPrefName, Context.MODE_PRIVATE);
96
+ SharedPreferences.Editor editor = settings.edit();
97
+ String strKey = Base64.encodeToString(m_dbKeyData, false);//, Base64.DEFAULT);
98
+
99
+ editor.putString(m_strDBPartition, strKey );
100
+ if (editor.commit()) {
101
+ Logger.I(TAG, "Key is successfully saved to Shared Preferences");
102
+ } else {
103
+ Logger.E(TAG, "Write key to Shared Preferences is failed");
104
+ }
105
+
106
+ if (DEBUG) {
107
+ Logger.I(TAG, "Key: " + dumpKey(m_dbKeyData));
108
+ Logger.I(TAG, "Encoded key: " + strKey);
109
+ }
80
110
  }
81
111
 
82
112
  private void initKey(String szPartition)throws Exception
@@ -118,35 +148,38 @@ public class RhoCryptImpl
118
148
  m_decryptCipher.init(Cipher.DECRYPT_MODE, skeySpec, paramSpec);
119
149
 
120
150
  Logger.T(TAG, "RhoCrypt context initialized for partition: " + szPartition);
151
+ }
121
152
 
122
- }
123
-
124
- private static void reportFail(String name, Exception e)
125
- {
126
- Logger.E(TAG, "Call of \"" + name + "\" failed: " + e.getClass().getSimpleName() + ": " + e.getMessage());
127
- }
128
-
129
153
  public boolean db_encrypt( String szPartition, ByteBuffer dataIn, ByteBuffer dataOut )
130
154
  {
131
- try
132
- {
133
- initContext(szPartition);
155
+ try
156
+ {
157
+ initContext(szPartition);
134
158
 
135
159
  dataOut.rewind();
136
160
 
137
161
  if (m_encryptCipher == null)
138
162
  throw new NullPointerException("m_encryptCipher == null");
139
163
 
140
- m_encryptCipher.doFinal(dataIn, dataOut);
164
+ /* *********************************************************
165
+ * Work around Android 4 bug:
166
+ * http://code.google.com/p/android/issues/detail?id=24327
167
+ */
168
+ ByteBuffer input = ByteBuffer.allocate(dataIn.capacity());
169
+ input.put(dataIn);
170
+ input.rewind();
171
+ /* ******************************************************* */
172
+
173
+ m_encryptCipher.doFinal(input, dataOut);
141
174
 
142
- return true;
143
- }catch(Exception exc)
144
- {
145
- reportFail("db_encrypt", exc);
146
- return false;
147
- }
175
+ return true;
176
+ }catch(Exception exc)
177
+ {
178
+ Logger.E(TAG, exc);
179
+ return false;
180
+ }
148
181
  }
149
-
182
+
150
183
  public boolean db_decrypt( String szPartition, ByteBuffer dataIn, ByteBuffer dataOut )
151
184
  {
152
185
  try
@@ -158,12 +191,21 @@ public class RhoCryptImpl
158
191
  if (m_decryptCipher == null)
159
192
  throw new NullPointerException("m_decryptCipher == null");
160
193
 
161
- m_decryptCipher.doFinal(dataIn, dataOut);
194
+ /* *********************************************************
195
+ * Work around Android 4 bug:
196
+ * http://code.google.com/p/android/issues/detail?id=24327
197
+ */
198
+ ByteBuffer input = ByteBuffer.allocate(dataIn.capacity());
199
+ input.put(dataIn);
200
+ input.rewind();
201
+ /* ******************************************************* */
202
+
203
+ m_decryptCipher.doFinal(input, dataOut);
162
204
 
163
205
  return true;
164
206
  }catch(Exception exc)
165
207
  {
166
- reportFail("db_decrypt", exc);
208
+ Logger.E(TAG, exc);
167
209
  return false;
168
210
  }
169
211
  }
@@ -175,7 +217,7 @@ public class RhoCryptImpl
175
217
 
176
218
  if ( keyData.length != (m_nKeyLenBit/8))
177
219
  {
178
- reportFail("set_db_CryptKey", new Exception("Incorrect key size : " + keyData.length + "; Should be: " + (int)(m_nKeyLenBit/8)));
220
+ Logger.E(TAG, "Incorrect key size : " + keyData.length + "; Should be: " + (int)(m_nKeyLenBit/8));
179
221
  return false;
180
222
  }
181
223
  m_dbKeyData = keyData;
@@ -60,7 +60,7 @@ public class RhodesActivity extends BaseActivity {
60
60
 
61
61
  private static final boolean DEBUG = false;
62
62
 
63
- public static boolean ENABLE_LOADING_INDICATION = true;
63
+ public static boolean ENABLE_LOADING_INDICATION = false;
64
64
 
65
65
  public static int MAX_PROGRESS = 10000;
66
66
 
@@ -137,6 +137,7 @@ public class RhodesActivity extends BaseActivity {
137
137
  protected void onCreate(Bundle savedInstanceState) {
138
138
 
139
139
  super.onCreate(savedInstanceState);
140
+ Log.i(TAG, ">>>>>>>>>>>>>>> onCreate()");
140
141
 
141
142
  mListeners = new ArrayList<RhodesActivityListener>();
142
143
 
@@ -154,15 +155,13 @@ public class RhodesActivity extends BaseActivity {
154
155
  else {
155
156
  }
156
157
  requestWindowFeature(Window.FEATURE_PROGRESS);
157
- getWindow().setFeatureInt(Window.FEATURE_PROGRESS, 10000);
158
+ getWindow().setFeatureInt(Window.FEATURE_PROGRESS, MAX_PROGRESS);
158
159
 
159
160
  mHandler = new Handler();
160
161
 
161
162
  mSplashScreen = new SplashScreen(this);
162
163
  setMainView(mSplashScreen);
163
164
 
164
- Log.i(TAG, ">>>>>>>>>>>>>>> onCreate()");
165
-
166
165
  processStartupListeners();
167
166
  {
168
167
  Iterator<RhodesActivityListener> iterator = mListeners.iterator();
@@ -832,7 +832,7 @@ public class RhodesService extends Service {
832
832
  return AndroidFunctionalityManager.getAndroidFunctionality().AccessOwnerInfo_getEmail(getContext());
833
833
  }
834
834
  else if (name.equalsIgnoreCase("device_name")) {
835
- return Build.DEVICE;
835
+ return Build.MANUFACTURER + " " + Build.DEVICE;
836
836
  }
837
837
  else if (name.equalsIgnoreCase("is_emulator")) {
838
838
  String strDevice = Build.DEVICE;
@@ -91,7 +91,7 @@ public class SplashScreen implements MainView {
91
91
  }
92
92
  catch (IOException e) {
93
93
  if (DEBUG)
94
- Log.d(TAG, "Can't load " + url, e);
94
+ Log.d(TAG, "Can't load " + url + ": " + e.getMessage());
95
95
  continue;
96
96
  }
97
97
  finally {
@@ -116,7 +116,15 @@ public class SplashScreen implements MainView {
116
116
  RhodesApplication.stop();
117
117
  }
118
118
  } else {
119
- view = new GoogleWebView(context);
119
+ final GoogleWebView googleWebView = new GoogleWebView(context);
120
+ view = googleWebView;
121
+ RhodesApplication.runWhen(RhodesApplication.AppState.AppStarted, new RhodesApplication.StateHandler(true) {
122
+ @Override
123
+ public void run()
124
+ {
125
+ googleWebView.applyWebSettings();
126
+ }
127
+ });
120
128
  }
121
129
 
122
130
  switch (type) {
@@ -37,10 +37,7 @@ import android.util.DisplayMetrics;
37
37
  import com.google.android.maps.GeoPoint;
38
38
  import com.google.android.maps.ItemizedOverlay;
39
39
  import com.google.android.maps.OverlayItem;
40
- import com.rhomobile.rhodes.RhodesService;
41
- import com.rhomobile.rhodes.WebView;
42
40
  import com.rhomobile.rhodes.file.RhoFileApi;
43
- import com.rhomobile.rhodes.util.Utils;
44
41
 
45
42
  public class AnnotationsOverlay extends ItemizedOverlay<OverlayItem> {
46
43
 
@@ -75,7 +75,11 @@ public class Callout {
75
75
  mTitle = title;
76
76
  mDetails = details;
77
77
  mUrl = url;
78
-
78
+
79
+ if (mDetails == null) {
80
+ mDetails = "";
81
+ }
82
+
79
83
  if (mUrl != null) {
80
84
  if (mUrl.length() < 2) {
81
85
  mUrl = null;
@@ -84,8 +88,6 @@ public class Callout {
84
88
 
85
89
  Paint paint = new Paint();
86
90
  paint.setAntiAlias(true);
87
-
88
-
89
91
 
90
92
  int title_width = 0;
91
93
  int title_height = 0;
@@ -99,12 +101,11 @@ public class Callout {
99
101
  title_height = rcLine.bottom - rcLine.top;
100
102
  int max_text_width = title_width;
101
103
 
102
-
103
104
  int details_width = 0;
104
105
  int details_height = 0;
105
106
  int details_max_line_height = 0;
106
107
  // calc Details size (W,H)
107
- String [] lines = details.split("\n");
108
+ String [] lines = mDetails.split("\n");
108
109
  int i;
109
110
  paint.setColor(DETAILS_COLOR);
110
111
  paint.setTextSize(DETAILS_FONT_SIZE);
@@ -57,7 +57,6 @@ import com.rhomobile.rhodes.RhoConf;
57
57
  import com.rhomobile.rhodes.RhodesActivity;
58
58
  import com.rhomobile.rhodes.RhodesService;
59
59
  import com.rhomobile.rhodes.util.PerformOnUiThread;
60
- import com.rhomobile.rhodes.util.Utils;
61
60
 
62
61
  public class GoogleMapView extends MapActivity {
63
62
 
@@ -55,6 +55,7 @@ public class ImageCapture extends BaseActivity implements OnClickListener
55
55
 
56
56
  private String callbackUrl;
57
57
  private String imageFormat;
58
+
58
59
  private SimpleDateFormat timeStampFormat = new SimpleDateFormat("yyyyMMddHHmmssSS");
59
60
 
60
61
  private SignatureView surfaceView;
@@ -74,7 +75,7 @@ public class ImageCapture extends BaseActivity implements OnClickListener
74
75
 
75
76
  Bundle extras = getIntent().getExtras();
76
77
  callbackUrl = extras.getString(com.rhomobile.rhodes.signature.Signature.INTENT_EXTRA_PREFIX + "callback");
77
- imageFormat = extras.getString(com.rhomobile.rhodes.signature.Signature.INTENT_EXTRA_PREFIX + "format");
78
+ imageFormat = extras.getString(com.rhomobile.rhodes.signature.Signature.INTENT_EXTRA_PREFIX + "imageFormat");
78
79
 
79
80
  surfaceView = (SignatureView) findViewById(AndroidR.id.signature_view);
80
81
  surfaceHolder = surfaceView.getHolder();
@@ -86,6 +87,11 @@ public class ImageCapture extends BaseActivity implements OnClickListener
86
87
  clearButton.setOnClickListener(this);
87
88
  okButton = (ImageButton)findViewById(AndroidR.id.sig_okButton);
88
89
  okButton.setOnClickListener(this);
90
+
91
+ int penColor = extras.getInt(com.rhomobile.rhodes.signature.Signature.INTENT_EXTRA_PREFIX + "penColor");
92
+ float penWidth = extras.getFloat(com.rhomobile.rhodes.signature.Signature.INTENT_EXTRA_PREFIX + "penWidth");
93
+ int bgColor = extras.getInt(com.rhomobile.rhodes.signature.Signature.INTENT_EXTRA_PREFIX + "bgColor");
94
+ surfaceView.setupView(penColor, penWidth, bgColor);
89
95
  }
90
96
 
91
97
  @Override
@@ -27,6 +27,8 @@
27
27
  package com.rhomobile.rhodes.signature;
28
28
 
29
29
  import java.io.File;
30
+ import java.util.Map;
31
+ import java.util.Vector;
30
32
 
31
33
  import android.content.Intent;
32
34
 
@@ -55,12 +57,18 @@ public class Signature {
55
57
  private static class Picture implements Runnable {
56
58
  private String url;
57
59
  private Class<?> klass;
58
- private String format;
60
+ private String imageFormat;
61
+ private int penColor;
62
+ private float penWidth;
63
+ private int bgColor;
59
64
 
60
- public Picture(String u, Class<?> c, String form) {
65
+ public Picture(String u, Class<?> c, String _imageFormat, int _penColor, float _penWidth, int _bgColor) {
61
66
  url = u;
62
67
  klass = c;
63
- format = form;
68
+ imageFormat = _imageFormat;
69
+ penColor = _penColor;
70
+ penWidth = _penWidth;
71
+ bgColor = _bgColor;
64
72
  }
65
73
 
66
74
  public void run() {
@@ -68,14 +76,46 @@ public class Signature {
68
76
  RhodesActivity ra = RhodesActivity.getInstance();
69
77
  Intent intent = new Intent(ra, klass);
70
78
  intent.putExtra(INTENT_EXTRA_PREFIX + "callback", url);
71
- intent.putExtra(INTENT_EXTRA_PREFIX + "format", format);
79
+ intent.putExtra(INTENT_EXTRA_PREFIX + "imageFormat", imageFormat);
80
+ intent.putExtra(INTENT_EXTRA_PREFIX + "penColor", penColor);
81
+ intent.putExtra(INTENT_EXTRA_PREFIX + "penWidth", penWidth);
82
+ intent.putExtra(INTENT_EXTRA_PREFIX + "bgColor", bgColor);
72
83
  ra.startActivity(intent);
73
84
  }
74
85
  };
75
86
 
76
- public static void takeSignature(String url, String format) {
87
+ public static void takeSignature(String url, Object params) {
77
88
  try {
78
- Runnable runnable = new Picture(url, ImageCapture.class, format);
89
+ String imageFormat = "png";
90
+ int penColor = 0xFF66009A;
91
+ float penWidth = 2;
92
+ int bgColor = 0xFFFFFFFF;
93
+
94
+ if (params instanceof Map<?,?>) {
95
+ Map<Object,Object> settings = (Map<Object,Object>)params;
96
+
97
+ Object imgFrmtObj = settings.get("imageFormat");
98
+ if ((imgFrmtObj != null) && (imgFrmtObj instanceof String)) {
99
+ imageFormat = new String(((String)imgFrmtObj));
100
+ }
101
+
102
+ Object penColorObj = settings.get("penColor");
103
+ if ((penColorObj != null) && (penColorObj instanceof String)) {
104
+ penColor = Integer.parseInt((String)penColorObj) | 0xFF000000;
105
+ }
106
+
107
+ Object penWidthObj = settings.get("penWidth");
108
+ if ((penWidthObj != null) && (penWidthObj instanceof String)) {
109
+ penWidth = Float.parseFloat((String)penWidthObj);
110
+ }
111
+
112
+ Object bgColorObj = settings.get("bgColor");
113
+ if ((bgColorObj != null) && (bgColorObj instanceof String)) {
114
+ bgColor = Integer.parseInt((String)bgColorObj) | 0xFF000000;
115
+ }
116
+ }
117
+
118
+ Runnable runnable = new Picture(url, ImageCapture.class, imageFormat, penColor, penWidth, bgColor);
79
119
  PerformOnUiThread.exec(runnable, false);
80
120
  }
81
121
  catch (Exception e) {