rhodes 7.5.1 → 7.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +319 -0
- data/README.md +3 -15
- data/Rakefile +3 -0
- data/appveyor.yml +37 -32
- data/azure-pipelines.yml +1 -1
- data/bin/rhodes-setup +22 -8
- data/extensions/emdk3-manager/ext/platform/android/src/com/rho/emdk3/EMDK3Extension.java +14 -5
- data/extensions/instrumentation/ext/platform/android/src/com/rho/instrumentation/Instrumentation.java +29 -15
- data/extensions/rhoconnect-push/ext/rhoconnect-push/platform/android/src/com/rhomobile/rhoelements/ans/ANSManager.java +1 -1
- data/extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/ElementsCore.java +12 -9
- data/extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/graphics/BatteryIndicator.java +2 -2
- data/lib/commonAPI/barcode/ext/platform/qt/Barcode.pro +1 -1
- data/lib/commonAPI/barcode/ext/platform/qt/Barcode.pro.erb +2 -2
- data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing.pri +9 -21
- data/lib/commonAPI/barcode/ext.yml +1 -0
- data/lib/commonAPI/bluetooth/ext/platform/qt/Bluetooth.pro +1 -1
- data/lib/commonAPI/bluetooth/ext/platform/qt/Bluetooth.pro.erb +1 -1
- data/lib/commonAPI/bluetooth/ext/platform/qt/src/bluetooth/bluetoothhelper.h +1 -1
- data/lib/commonAPI/coreapi/RhoSystemApi.rb +6 -0
- data/lib/commonAPI/coreapi/ext/Intent.xml +4 -0
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/intent/IntentSingleton.java +6 -0
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/Notification.java +2 -1
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationScheduler.java +1 -1
- data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/webview/WebViewSingleton.java +40 -27
- data/lib/commonAPI/coreapi/ext/platform/iphone/cpp_based_impl/SystemImpl.mm +5 -6
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/Intent.h +1 -1
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/Intent.m +3 -1
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NotificationSingleton.h +2 -1
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NotificationSingleton.m +10 -0
- data/lib/commonAPI/coreapi/ext/platform/wm/src/IntentImpl.cpp +3 -0
- data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.cpp +13 -0
- data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.h +2 -0
- data/lib/commonAPI/coreapi/ext/system.xml +3 -0
- data/lib/commonAPI/mediacapture/ext/platform/android/ApplicationCameraActivity.erb +2 -2
- data/lib/commonAPI/mediacapture/ext/platform/android/ApplicationFileProvider.erb +1 -1
- data/lib/commonAPI/mediacapture/ext/platform/android/ext_java.files +1 -0
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraObject.java +8 -4
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java +8 -0
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/mediacapture/RhoCameraFileProvider.java +6 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/MediaCapture.pro.erb +1 -1
- data/lib/commonAPI/mediacapture/ext/platform/qt/Mediacapture.pro +1 -1
- data/lib/commonAPI/signature/ext/platform/iphone/impl/readme.txt +7 -0
- data/lib/commonAPI/signature/ext/platform/qt/Signature.pro +3 -10
- data/lib/commonAPI/signature/ext/platform/qt/Signature.pro.erb +2 -2
- data/lib/extensions/fcm-push/ext/iphone/Podfile +15 -2
- data/lib/extensions/fcm-push/ext/iphone/fcm-push.xcodeproj/project.pbxproj +6 -7
- data/lib/extensions/nfc/ext/platform/android/src/com/rhomobile/nfc/Nfc.java +2 -1
- data/lib/extensions/serialport/ext/serialport.pro +1 -1
- data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +1 -0
- data/platform/android/Rhodes/jni/src/fileapi.cpp +4 -0
- data/platform/android/Rhodes/res/drawable/baseline_check_24.xml +5 -0
- data/platform/android/Rhodes/res/drawable/baseline_check_240.xml +5 -0
- data/platform/android/Rhodes/res/drawable/baseline_close_24.xml +5 -0
- data/platform/android/Rhodes/res/drawable/baseline_close_240.xml +5 -0
- data/platform/android/Rhodes/res/layout/overlay_layout.xml +39 -0
- data/platform/android/Rhodes/res/layout/perrmission_alert_dialog.xml +267 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +183 -66
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/LocalFileProvider.java +38 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoFileProvider.java +32 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +529 -89
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +26 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +256 -160
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoExtension.java +14 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +4 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +5 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +79 -38
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +6 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/CallReceiver.java +22 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/IKioskMode.java +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/KioskManager.java +18 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyAccessibilityService.java +230 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyNotificationListenerService.java +16 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyOverlayService.java +197 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/PermissionManager.java +232 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +34 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/permissioncheck/CheckDrawable.java +53 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/permissioncheck/PermissionListGenerate.java +366 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/rhodes.iml +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +782 -41
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoInputConnectionWrapper.java +146 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoInputListener.java +21 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +92 -32
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/TauWebViewOptions.java +118 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebSettingsProviderBase.java +18 -17
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebSettingsProviderEclairMR1.java +4 -4
- data/platform/android/build/RhodesSRC_build.files +13 -0
- data/platform/android/build/android-repack.rake +8 -1
- data/platform/android/build/android.rake +118 -51
- data/platform/android/build/android_tools.rb +1 -1
- data/platform/android/build/androidcommon.rb +13 -7
- data/platform/android/build/config.yml +4 -1
- data/platform/android/build/manifest_generator.rb +14 -10
- data/platform/android/build/maven_deps_extractor.rb +7 -1
- data/platform/android/build/ndkwrapper.rb +12 -0
- data/platform/android/proguard/proguard-base-rules.pro +5 -0
- data/platform/android/proguard/proguard.jar +0 -0
- data/platform/iphone/Classes/RhoAppBaseLib-Bridging-Header.h +4 -0
- data/platform/iphone/Classes/RhoAppBaseStandaloneLib-Bridging-Header.h +4 -0
- data/platform/iphone/Classes/RhoCryptAESGCM.swift +105 -0
- data/platform/iphone/Classes/RhoUIWebView.h +1 -1
- data/platform/iphone/Classes/RhoUIWebView.m +1 -1
- data/platform/iphone/Classes/RhoWKWebView.h +1 -1
- data/platform/iphone/Classes/RhoWKWebView.mm +32 -4
- data/platform/iphone/Classes/RhoWebView.h +1 -1
- data/platform/iphone/Classes/RhoWebViewFabrique.m +7 -1
- data/platform/iphone/Classes/SimpleMainView.m +5 -5
- data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.m +21 -10
- data/platform/iphone/Classes/rho/net/IPhoneNetRequest.mm +4 -0
- data/platform/iphone/Framework/RhoApplication/RhoApplication.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/Framework/Rhodes/Rhodes.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/RhoAppBaseLib/RhoAppBaseLib.xcodeproj/project.pbxproj +46 -1
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/curl/curl.xcodeproj/project.pbxproj +4 -1
- data/platform/iphone/rbuild/iphone.rake +9 -8
- data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +4 -1
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +1 -1
- data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +1 -1
- data/platform/osx/bin/RhoSimulator/RhoSimulator.app.zip +0 -0
- data/platform/sailfish/build/{harbour-SailfishRhodes.pro.erb → SailfishRhodes.pro.erb} +10 -17
- data/platform/sailfish/build/rhodes.pro.erb +7 -17
- data/platform/sailfish/build/rpm/SailfishRhodes.desktop.erb +12 -0
- data/platform/sailfish/build/rpm/SailfishRhodes.erb +2 -0
- data/platform/sailfish/build/rpm/SailfishRhodes.spec.erb +43 -0
- data/platform/sailfish/build/rubylib.pro.erb +29 -29
- data/platform/sailfish/build/sailfish.rake +188 -180
- data/platform/sailfish/keys/regular_cert.pem +14 -0
- data/platform/sailfish/keys/regular_key.pem +4 -0
- data/platform/shared/common/RhodesApp.cpp +33 -9
- data/platform/shared/common/iphone/RhoCryptImpl.mm +130 -54
- data/platform/shared/qt/RhoSimulator.pro +1 -1
- data/platform/shared/qt/rhodes/rhodes.pro +4 -11
- data/platform/shared/qt/sailfish/SailfishRhodes.desktop +3 -4
- data/platform/shared/qt/sailfish/SailfishRhodes.pro +9 -10
- data/platform/shared/qt/sailfish/icons/108x108/108x108.png +0 -0
- data/platform/shared/qt/sailfish/privileges/sailfishrhodes +2 -0
- data/platform/shared/qt/sailfish/qml/pages/FirstPageWK.qml +7 -11
- data/platform/shared/qt/sailfish/qml/{harbour-sailfishrhodes.qml → sailfishrhodes.qml} +1 -1
- data/platform/shared/qt/sailfish/rpm/sailfishrhodes.spec +80 -0
- data/platform/shared/qt/sailfish/rpm/{harbour-sailfishrhodes.yaml → sailfishrhodes.yaml} +2 -2
- data/platform/shared/qt/sailfish/src/QtMainWindow.cpp +1 -1
- data/platform/shared/qt/sailfish/src/QtMainWindow.h +1 -1
- data/platform/shared/qt/sailfish/src/main.cpp +6 -38
- data/platform/shared/qt/sailfish/src/rootdelegate.h +2 -14
- data/platform/shared/ruby/aurora/ruby/config.h +386 -0
- data/platform/shared/ruby/aurora/ruby/constdefs.c +5866 -0
- data/platform/shared/ruby/aurora/ruby/constdefs.h +1788 -0
- data/platform/shared/sqlite/crypto.c +14 -0
- data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
- data/platform/win32/build/rhodes.nsi +3 -3
- data/platform/win32/build/win32.rake +1 -1
- data/rakefile.rb +3 -0
- data/res/build-tools/iphonesim/build/Release/iphonesim_8 +4 -4
- data/res/generators/templates/application/AndroidManifest.erb +26 -5
- data/res/generators/templates/application/build.yml +14 -10
- data/res/generators/templates/application/resources/android/res/xml/provider_paths.xml +4 -0
- data/res/generators/templates/application/rhoconfig.txt +10 -1
- data/res/generators/templates/iphone_project/Bremen8.xcodeproj/project.pbxproj +24 -1
- data/res/generators/templates/iphone_project/Classes/SimpleSwiftClass.swift +20 -0
- data/res/generators/templates/iphone_project/Classes/rhorunner-Bridging-Header.h +4 -0
- data/rhobuild.yml.example +3 -3
- data/rhodes.gemspec +4 -2
- data/version +1 -1
- metadata +81 -26
- data/platform/sailfish/build/rho_build.cmd.erb +0 -14
- data/platform/sailfish/build/rho_clean.cmd.erb +0 -14
- data/platform/sailfish/build/rho_deploy.cmd.erb +0 -15
- data/platform/sailfish/build/rho_rpm.cmd.erb +0 -14
- data/platform/sailfish/build/rho_rpmvalidation.cmd.erb +0 -14
- data/platform/sailfish/build/rpm/harbour-SailfishRhodes.desktop.erb +0 -7
- data/platform/sailfish/build/rpm/harbour-SailfishRhodes.erb +0 -2
- data/platform/sailfish/build/rpm/harbour-SailfishRhodes.yaml.erb +0 -37
- data/platform/shared/qt/sailfish/harbour-sailfishrhodes.desktop +0 -6
- data/platform/shared/qt/sailfish/icons/108x108/harbour-sailfishrhodes.png +0 -0
- data/platform/shared/qt/sailfish/privileges/harbour-sailfishrhodes +0 -2
- data/platform/shared/qt/sailfish/qml/pages/FirstPageWE.qml +0 -236
- /data/platform/shared/qt/sailfish/icons/128x128/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
- /data/platform/shared/qt/sailfish/icons/172x172/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
- /data/platform/shared/qt/sailfish/icons/86x86/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
@@ -31,10 +31,10 @@ import com.rhomobile.rhodes.util.PerformOnUiThread;
|
|
31
31
|
|
32
32
|
public class Instrumentation extends InstrumentationBase implements IInstrumentation, IRhoExtension {
|
33
33
|
private static final String TAG = "Rho::Instrumentation";
|
34
|
-
|
34
|
+
|
35
35
|
public Instrumentation(String id) {
|
36
36
|
super(id);
|
37
|
-
RhoExtManager.getInstance().registerExtension("instrumentation", this);
|
37
|
+
RhoExtManager.getInstance().registerExtension("instrumentation", this);
|
38
38
|
}
|
39
39
|
|
40
40
|
@Override
|
@@ -65,7 +65,7 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
65
65
|
|
66
66
|
@Override
|
67
67
|
public void simulate_touch_event(final int event_type, final int x, final int y, IMethodResult result)
|
68
|
-
{
|
68
|
+
{
|
69
69
|
new Thread(new Runnable()
|
70
70
|
{
|
71
71
|
public void run()
|
@@ -130,7 +130,7 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
130
130
|
public void get_allocated_memory(IMethodResult result) {
|
131
131
|
Debug.MemoryInfo memoryInfo = new Debug.MemoryInfo();
|
132
132
|
Debug.getMemoryInfo(memoryInfo);
|
133
|
-
|
133
|
+
|
134
134
|
result.set(memoryInfo.getTotalPss());
|
135
135
|
}
|
136
136
|
|
@@ -138,12 +138,12 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
138
138
|
public void delete_file(String fileName, IMethodResult result) {
|
139
139
|
int res = 0;
|
140
140
|
final String basePath = Environment.getExternalStorageDirectory().getAbsolutePath();
|
141
|
-
|
141
|
+
|
142
142
|
if ( (fileName == null) || (fileName.equals("")) ) {
|
143
143
|
result.set(-1);
|
144
144
|
return;
|
145
145
|
}
|
146
|
-
|
146
|
+
|
147
147
|
fileName = fileName.replaceAll("\\\\", "/");
|
148
148
|
try
|
149
149
|
{
|
@@ -157,21 +157,21 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
157
157
|
{
|
158
158
|
res = -1;
|
159
159
|
}
|
160
|
-
|
160
|
+
|
161
161
|
result.set(res);
|
162
|
-
|
162
|
+
|
163
163
|
}
|
164
164
|
|
165
165
|
@Override
|
166
166
|
public void file_exists(String fileName, IMethodResult result) {
|
167
167
|
int res = 0;
|
168
168
|
final String basePath = Environment.getExternalStorageDirectory().getAbsolutePath();
|
169
|
-
|
169
|
+
|
170
170
|
if ( (fileName == null) || (fileName.equals("")) ) {
|
171
171
|
result.set(-1);
|
172
172
|
return;
|
173
173
|
}
|
174
|
-
|
174
|
+
|
175
175
|
fileName = fileName.replaceAll("\\\\", "/");
|
176
176
|
try
|
177
177
|
{
|
@@ -185,9 +185,9 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
185
185
|
{
|
186
186
|
res = -1;
|
187
187
|
}
|
188
|
-
|
188
|
+
|
189
189
|
result.set(res);
|
190
|
-
|
190
|
+
|
191
191
|
}
|
192
192
|
|
193
193
|
@Override
|
@@ -228,7 +228,7 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
228
228
|
}
|
229
229
|
}
|
230
230
|
});
|
231
|
-
|
231
|
+
|
232
232
|
}
|
233
233
|
|
234
234
|
@Override
|
@@ -272,7 +272,7 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
272
272
|
// TODO Auto-generated method stub
|
273
273
|
return false;
|
274
274
|
}
|
275
|
-
|
275
|
+
|
276
276
|
@Override
|
277
277
|
public boolean onNavigateStarted(IRhoExtManager extManager, String url,
|
278
278
|
IRhoWebView ext, boolean res) {
|
@@ -301,6 +301,20 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
301
301
|
return false;
|
302
302
|
}
|
303
303
|
|
304
|
+
@Override
|
305
|
+
public boolean onGoBack(IRhoExtManager extManager, String current_url, String back_url, IRhoWebView ext, boolean res) {
|
306
|
+
// TODO Auto-generated method stub
|
307
|
+
return false;
|
308
|
+
}
|
309
|
+
|
310
|
+
@Override
|
311
|
+
public boolean onGoForward(IRhoExtManager extManager, String current_url, String forward_url, IRhoWebView ext, boolean res) {
|
312
|
+
// TODO Auto-generated method stub
|
313
|
+
return false;
|
314
|
+
}
|
315
|
+
|
316
|
+
|
317
|
+
|
304
318
|
@Override
|
305
319
|
public boolean onSelect(IRhoExtManager extManager, String[] items,
|
306
320
|
int selected, IRhoWebView ext, boolean res) {
|
@@ -351,7 +365,7 @@ public class Instrumentation extends InstrumentationBase implements IInstrumenta
|
|
351
365
|
@Override
|
352
366
|
public void onAppActivate(IRhoExtManager extManager, boolean bActivate) {
|
353
367
|
// TODO Auto-generated method stub
|
354
|
-
|
368
|
+
|
355
369
|
}
|
356
370
|
|
357
371
|
@Override
|
@@ -96,7 +96,7 @@ public class ANSManager {
|
|
96
96
|
|
97
97
|
// The pending intent provides a spoof-proof way to pass the
|
98
98
|
// package-name string
|
99
|
-
intent.putExtra("app", PendingIntent.getBroadcast(context, 0, new Intent(),
|
99
|
+
intent.putExtra("app", PendingIntent.getBroadcast(context, 0, new Intent(), PendingIntent.FLAG_IMMUTABLE));
|
100
100
|
// The sender ID needs to be passed along for identification purposes
|
101
101
|
intent.putExtra(ANSConstants.ANS_EXTRA_APP_NAME, appName);
|
102
102
|
intent.putExtra(ANSConstants.ANS_EXTRA_USER_NAME, userName);
|
@@ -2112,15 +2112,18 @@ public class ElementsCore implements IActivityListener, IElementsCore,
|
|
2112
2112
|
} catch (IOException e) {
|
2113
2113
|
e.printStackTrace();
|
2114
2114
|
}
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2122
|
-
|
2123
|
-
|
2115
|
+
if ( doc != null )
|
2116
|
+
{
|
2117
|
+
doc.getDocumentElement().normalize();
|
2118
|
+
NodeList nList = doc.getElementsByTagName("IntentAction");
|
2119
|
+
for (int temp = 0; temp < nList.getLength(); temp++) {
|
2120
|
+
intentfilter.addAction(nList.item(temp).getAttributes().getNamedItem("value").getTextContent());
|
2121
|
+
}
|
2122
|
+
NodeList nList_cat = doc.getElementsByTagName("IntentCategory");
|
2123
|
+
for (int i = 0; i < nList_cat.getLength(); i++) {
|
2124
|
+
intentfilter.addCategory(nList_cat.item(i).getAttributes().getNamedItem("value").getTextContent());
|
2125
|
+
}
|
2126
|
+
}
|
2124
2127
|
RhodesActivity.getContext().registerReceiver(mReceiver, intentfilter);
|
2125
2128
|
RECEIVER_REGISTER_STATUS = 1;
|
2126
2129
|
}
|
@@ -381,7 +381,7 @@ public class BatteryIndicator extends Indicator
|
|
381
381
|
display = ((WindowManager)RhodesActivity.safeGetInstance().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
382
382
|
}
|
383
383
|
catch (Exception e) {
|
384
|
-
|
384
|
+
Common.logger.add(new LogEntry(LogEntry.PB_LOG_ERROR, e.toString()));
|
385
385
|
}
|
386
386
|
int width = display.getWidth(); // deprecated
|
387
387
|
int height = display.getHeight(); // deprecated
|
@@ -425,7 +425,7 @@ public class BatteryIndicator extends Indicator
|
|
425
425
|
}
|
426
426
|
}
|
427
427
|
catch (Exception e) {
|
428
|
-
|
428
|
+
Common.logger.add(new LogEntry(LogEntry.PB_LOG_ERROR, e.toString()));
|
429
429
|
}
|
430
430
|
|
431
431
|
}
|
@@ -8,7 +8,7 @@ equals(QT_MAJOR_VERSION, 5) {
|
|
8
8
|
equals(QT_MINOR_VERSION, 6): {
|
9
9
|
QT += webkit quick
|
10
10
|
DEFINES += OS_SAILFISH OS_LINUX
|
11
|
-
CONFIG +=
|
11
|
+
CONFIG += auroraapp c++14 auroraapp_i18n
|
12
12
|
}
|
13
13
|
greaterThan(QT_MINOR_VERSION, 7): {
|
14
14
|
QT += webengine webenginecore webenginewidgets multimediawidgets widgets
|
@@ -1,6 +1,6 @@
|
|
1
|
-
QT += core gui widgets multimedia network webkit
|
1
|
+
QT += core gui widgets multimedia network webkit
|
2
2
|
DEFINES += OS_SAILFISH OS_LINUX
|
3
|
-
CONFIG +=
|
3
|
+
CONFIG += c++14
|
4
4
|
|
5
5
|
|
6
6
|
include(<%= @rhoRoot %>/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing.pri)
|
@@ -226,29 +226,17 @@ SOURCES += $$PWD/CameraImageWrapper.cpp \
|
|
226
226
|
$$PWD/zxing/bigint/BigIntegerAlgorithms.cc \
|
227
227
|
$$PWD/zxing/bigint/BigInteger.cc
|
228
228
|
|
229
|
-
symbian {
|
230
|
-
TARGET.UID3 = 0xE618743C
|
231
|
-
TARGET.EPOCALLOWDLLDATA = 1
|
232
229
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
Location
|
240
|
-
}
|
241
|
-
|
242
|
-
unix:!symbian {
|
243
|
-
maemo5 {
|
244
|
-
target.path = /opt/usr/lib
|
245
|
-
} else {
|
246
|
-
target.path = /usr/lib
|
247
|
-
}
|
230
|
+
#unix:!symbian {
|
231
|
+
# maemo5 {
|
232
|
+
# target.path = /opt/usr/lib
|
233
|
+
# } else {
|
234
|
+
# target.path = /usr/lib
|
235
|
+
# }
|
248
236
|
|
249
|
-
DEFINES += NOFMAXL
|
250
|
-
INSTALLS += target
|
251
|
-
}
|
237
|
+
# DEFINES += NOFMAXL
|
238
|
+
# INSTALLS += target
|
239
|
+
#}
|
252
240
|
|
253
241
|
win32-msvc*{
|
254
242
|
|
@@ -11,6 +11,7 @@ android:
|
|
11
11
|
sdk_addons: ['EMDK']
|
12
12
|
maven_deps:
|
13
13
|
- 'com.google.android.gms:play-services-vision:20.1.3'
|
14
|
+
- 'androidx.core:core:1.5.0'
|
14
15
|
- 'androidx.appcompat:appcompat:1.3.0'
|
15
16
|
- 'androidx.lifecycle:lifecycle-common:2.3.1'
|
16
17
|
- 'androidx.lifecycle:lifecycle-common-java8:2.3.1'
|
@@ -155,6 +155,10 @@ Notice that this looks very similar to a standard AndroidManifest.XML file secti
|
|
155
155
|
<METHOD name="stopListening" hasCallback="none" productException="">
|
156
156
|
<DESC>Stop listening for custom intents.</DESC>
|
157
157
|
</METHOD>
|
158
|
+
<METHOD name="cleanStartParameters" hasCallback="none" productException="">
|
159
|
+
<PLATFORM>Android</PLATFORM>
|
160
|
+
<DESC>Stop listening for custom intents.</DESC>
|
161
|
+
</METHOD>
|
158
162
|
</METHODS>
|
159
163
|
<REMARKS>
|
160
164
|
<REMARK title="Registering Intent Receiver">
|
@@ -25,6 +25,7 @@ import com.rhomobile.rhodes.extmanager.IRhoExtManager;
|
|
25
25
|
import com.rhomobile.rhodes.extmanager.IRhoListener;
|
26
26
|
import com.rhomobile.rhodes.extmanager.RhoExtManager;
|
27
27
|
import com.rhomobile.rhodes.util.ContextFactory;
|
28
|
+
import com.rhomobile.rhodes.RhodesApplication;
|
28
29
|
|
29
30
|
public class IntentSingleton extends AbstractRhoListener implements IIntentSingleton, IIntentFactory, IRhoListener {
|
30
31
|
private static final String TAG = IntentSingleton.class.getSimpleName();
|
@@ -442,6 +443,11 @@ public class IntentSingleton extends AbstractRhoListener implements IIntentSingl
|
|
442
443
|
result.set(params);
|
443
444
|
}
|
444
445
|
}
|
446
|
+
@Override
|
447
|
+
public void cleanStartParameters(IMethodResult result){
|
448
|
+
RhodesApplication.setStartParametersApp("");
|
449
|
+
|
450
|
+
}
|
445
451
|
|
446
452
|
|
447
453
|
}
|
@@ -320,8 +320,9 @@ public class Notification {
|
|
320
320
|
}
|
321
321
|
|
322
322
|
builder.setSmallIcon(R.drawable.ic_notification);
|
323
|
+
|
323
324
|
builder.setContentIntent(PendingIntent.getActivity(ctx, id, new Intent(ctx, RhodesActivity.class),
|
324
|
-
|
325
|
+
/* PendingIntent.FLAG_UPDATE_CURRENT |*/ PendingIntent.FLAG_IMMUTABLE));
|
325
326
|
|
326
327
|
builder.setDefaults(android.app.Notification.DEFAULT_VIBRATE | android.app.Notification.DEFAULT_SOUND);
|
327
328
|
|
data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationScheduler.java
CHANGED
@@ -175,7 +175,7 @@ public class NotificationScheduler {
|
|
175
175
|
|
176
176
|
Intent new_intent = new Intent(context, cls);
|
177
177
|
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, RHO_NOTIFICATION_CODE, new_intent,
|
178
|
-
PendingIntent.FLAG_UPDATE_CURRENT);
|
178
|
+
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
179
179
|
AlarmManager am = (AlarmManager) context.getSystemService(ALARM_SERVICE);
|
180
180
|
|
181
181
|
if (interval < 0) {
|
@@ -31,12 +31,12 @@ import java.util.Map;
|
|
31
31
|
public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
32
32
|
|
33
33
|
private static final String TAG = WebViewSingleton.class.getSimpleName();
|
34
|
-
|
34
|
+
|
35
35
|
private static final String DISABLE_PAGE_LOADING_INDICATION = "disable_loading_indication";
|
36
36
|
private static final String ENABLE_ZOOM = "enable_screen_zoom";
|
37
37
|
private static final String ENABLE_WEB_PLUGINS = "enable_web_plugins";
|
38
38
|
private static final String ENABLE_CACHE = "WebView.enableCache";
|
39
|
-
private static final String DISABLE_SCANNER_NAVIGATION = "disable_scanner_during_navigation";
|
39
|
+
private static final String DISABLE_SCANNER_NAVIGATION = "disable_scanner_during_navigation";
|
40
40
|
private static final String ENABLE_MEDIA_PLAYBACK_WITHOUT_GESTURE = "enable_media_playback_without_gesture";
|
41
41
|
private WebViewConfig mConfig = new WebViewConfig();
|
42
42
|
|
@@ -57,9 +57,9 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
57
57
|
originalProxyHost = Proxy.getDefaultHost();
|
58
58
|
originalProxyPort = Proxy.getDefaultPort();
|
59
59
|
|
60
|
-
readRhoConfig(extManager.getConfig("rhoconfig"));
|
60
|
+
readRhoConfig(extManager.getConfig("rhoconfig"));
|
61
61
|
}
|
62
|
-
|
62
|
+
|
63
63
|
@Override
|
64
64
|
public void getFramework(IMethodResult result) {
|
65
65
|
result.set(RhodesActivity.safeGetInstance().getMainView().getWebView(-1).getEngineId());
|
@@ -373,7 +373,7 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
373
373
|
@Override
|
374
374
|
public boolean onWebViewCreated(IRhoExtManager extManager, IRhoWebView ext, boolean res) {
|
375
375
|
Logger.I(TAG, "Set config initially: " + (mConfig != null));
|
376
|
-
ext.setConfig(mConfig);
|
376
|
+
ext.setConfig(mConfig);
|
377
377
|
|
378
378
|
return res;
|
379
379
|
}
|
@@ -404,9 +404,9 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
404
404
|
|
405
405
|
|
406
406
|
if ( haveOriginalProxy ) {
|
407
|
-
//we have system/rhoelements proxy settings so decide what to do with URL
|
407
|
+
//we have system/rhoelements proxy settings so decide what to do with URL
|
408
408
|
if ( isLocalUrl ) {
|
409
|
-
//local URL, we don't need proxy
|
409
|
+
//local URL, we don't need proxy
|
410
410
|
dropProxySettings();
|
411
411
|
} else {
|
412
412
|
//set original proxy setting
|
@@ -426,7 +426,7 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
426
426
|
|
427
427
|
if ( haveOriginalProxy ) {
|
428
428
|
Logger.I( TAG, "Restoring proxy settings: " + originalProxyHost + ":" + String.valueOf(originalProxyPort) );
|
429
|
-
ProxySettings.setProxy(ContextFactory.getAppContext(),originalProxyHost,originalProxyPort);
|
429
|
+
ProxySettings.setProxy(ContextFactory.getAppContext(),originalProxyHost,originalProxyPort);
|
430
430
|
}
|
431
431
|
}
|
432
432
|
|
@@ -485,6 +485,19 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
485
485
|
return res;
|
486
486
|
}
|
487
487
|
|
488
|
+
@Override
|
489
|
+
public boolean onGoBack(IRhoExtManager extManager, String current_url, String back_url, IRhoWebView ext, boolean res) {
|
490
|
+
// TODO Auto-generated method stub
|
491
|
+
return false;
|
492
|
+
}
|
493
|
+
|
494
|
+
@Override
|
495
|
+
public boolean onGoForward(IRhoExtManager extManager, String current_url, String forward_url, IRhoWebView ext, boolean res) {
|
496
|
+
// TODO Auto-generated method stub
|
497
|
+
return false;
|
498
|
+
}
|
499
|
+
|
500
|
+
|
488
501
|
@Override
|
489
502
|
public boolean onAlert(IRhoExtManager extManager, String message, IRhoWebView ext, IAlertResult alertResult, boolean res) {
|
490
503
|
return res;
|
@@ -561,23 +574,23 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
561
574
|
@Override
|
562
575
|
public boolean onNewConfig(IRhoExtManager extManager, IRhoConfig config, String name, boolean res) {
|
563
576
|
|
564
|
-
if(name.equalsIgnoreCase("rhoelementsext")) {
|
577
|
+
/*if(name.equalsIgnoreCase("rhoelementsext")) {
|
565
578
|
readRhoelementsConfig(config);
|
566
|
-
RhodesApplication.runWhen(RhodesApplication.AppState.AppActivated, new RhodesApplication.
|
567
|
-
@Override public void
|
579
|
+
RhodesApplication.runWhen(RhodesApplication.AppState.AppActivated, new RhodesApplication.StateHandlerInUIThread(true) {
|
580
|
+
@Override public void runInUI() {
|
568
581
|
MainView mainView = RhodesActivity.safeGetInstance().getMainView();
|
569
582
|
for (int i = 0; i < mainView.getTabsCount(); ++i) {
|
570
583
|
Logger.T(TAG, "Set WebView config: tab " + i);
|
571
584
|
mainView.getWebView(i).setConfig(mConfig);
|
572
585
|
}
|
573
586
|
}});
|
574
|
-
} else
|
587
|
+
} else*/
|
575
588
|
if (name.equalsIgnoreCase("rhoconfig")) {
|
576
|
-
|
589
|
+
|
577
590
|
readRhoConfig(config);
|
578
591
|
|
579
|
-
RhodesApplication.runWhen(RhodesApplication.AppState.AppActivated, new RhodesApplication.
|
580
|
-
@Override public void
|
592
|
+
RhodesApplication.runWhen(RhodesApplication.AppState.AppActivated, new RhodesApplication.StateHandlerInUIThread(true) {
|
593
|
+
@Override public void runInUI() {
|
581
594
|
MainView mainView = RhodesActivity.safeGetInstance().getMainView();
|
582
595
|
for (int i = 0; i < mainView.getTabsCount(); ++i) {
|
583
596
|
Logger.T(TAG, "Set WebView config: tab " + i);
|
@@ -593,7 +606,7 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
593
606
|
public String onGetProperty(IRhoExtManager extManager, String name) {
|
594
607
|
return null;
|
595
608
|
}
|
596
|
-
|
609
|
+
|
597
610
|
private void readRhoelementsConfig(IRhoConfig config) {
|
598
611
|
if (config.isExist("enablezoom")) {
|
599
612
|
// mConfig.set(WebViewConfig.ENABLE_ZOOM, config.getBool("enable_screen_zoom", WebViewConfig.ENABLE_ZOOM_DEF));
|
@@ -605,7 +618,7 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
605
618
|
double zoomValue = config.getDouble("pagezoom");
|
606
619
|
mConfig.set(WebViewConfig.PAGE_ZOOM, zoomValue);
|
607
620
|
}
|
608
|
-
|
621
|
+
|
609
622
|
if (config.isExist("cache")) {
|
610
623
|
String cache = config.getString("cache");
|
611
624
|
cache=cache.toLowerCase();
|
@@ -614,17 +627,17 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
614
627
|
if(endString==-1)
|
615
628
|
endString=cache.indexOf("kb");
|
616
629
|
int cacheInt =Integer.parseInt(cache.substring(0,endString ).toString());
|
617
|
-
|
630
|
+
|
618
631
|
mConfig.set(WebViewConfig.ENABLE_CACHE, cacheInt!=0);
|
619
632
|
}
|
620
|
-
|
633
|
+
|
621
634
|
if(config.isExist("splashscreenpath")){
|
622
635
|
String splashscreenpathValue = config.getString("splashscreenpath");
|
623
636
|
if(splashscreenpathValue != null){
|
624
637
|
mConfig.set(WebViewConfig.SETTING_SPLASHSCREEN_PATH, splashscreenpathValue);
|
625
638
|
}
|
626
639
|
}
|
627
|
-
|
640
|
+
|
628
641
|
if(config.isExist("splashscreenduration")){
|
629
642
|
String splashscreendurationValue = config.getString("splashscreenduration");
|
630
643
|
if(splashscreendurationValue != null){
|
@@ -643,7 +656,7 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
643
656
|
|
644
657
|
originalProxyHost = hostURL;
|
645
658
|
originalProxyPort = port;
|
646
|
-
|
659
|
+
|
647
660
|
ProxySettings.setProxy(RhodesActivity.getContext(),hostURL,port);
|
648
661
|
}
|
649
662
|
}
|
@@ -653,14 +666,14 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
653
666
|
if(httpsProxy.length()!=0){
|
654
667
|
int index = httpsProxy.lastIndexOf(":");
|
655
668
|
if(index > -1)
|
656
|
-
{
|
669
|
+
{
|
657
670
|
String portNumber = httpsProxy.substring(index + 1, httpsProxy.length());
|
658
671
|
String hostURL = httpsProxy.substring(0, index);
|
659
672
|
int port = Integer.parseInt(portNumber);
|
660
673
|
|
661
674
|
originalProxyHost = hostURL;
|
662
675
|
originalProxyPort = port;
|
663
|
-
|
676
|
+
|
664
677
|
ProxySettings.setProxy(RhodesActivity.getContext(),hostURL,port);
|
665
678
|
}
|
666
679
|
}
|
@@ -692,7 +705,7 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
692
705
|
}
|
693
706
|
}
|
694
707
|
}
|
695
|
-
|
708
|
+
|
696
709
|
if(config.isExist("usedwforscanning")){
|
697
710
|
String _usedwforscanning = config.getString("usedwforscanning");
|
698
711
|
if(_usedwforscanning != null){
|
@@ -708,12 +721,12 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
708
721
|
mConfig.set(WebViewConfig.ENABLE_MEDIA_PLAYBACK_WITHOUT_GESTURE, false);
|
709
722
|
}
|
710
723
|
}
|
711
|
-
|
724
|
+
|
712
725
|
private void readRhoConfig(IRhoConfig config) {
|
713
726
|
if (RhoConf.isExist(DISABLE_PAGE_LOADING_INDICATION))
|
714
727
|
mConfig.set(WebViewConfig.ENABLE_PAGE_LOADING_INDICATION, !RhoConf.getBool(DISABLE_PAGE_LOADING_INDICATION));
|
715
728
|
|
716
|
-
|
729
|
+
|
717
730
|
if (RhoConf.isExist(ENABLE_ZOOM))
|
718
731
|
mConfig.set(WebViewConfig.ENABLE_ZOOM, RhoConf.getBool(ENABLE_ZOOM));
|
719
732
|
|
@@ -722,7 +735,7 @@ public class WebViewSingleton implements IWebViewSingleton, IRhoExtension {
|
|
722
735
|
|
723
736
|
if (RhoConf.isExist(ENABLE_CACHE))
|
724
737
|
mConfig.set(WebViewConfig.ENABLE_CACHE, RhoConf.getBool(ENABLE_CACHE));
|
725
|
-
|
738
|
+
|
726
739
|
if (RhoConf.isExist(DISABLE_SCANNER_NAVIGATION))
|
727
740
|
mConfig.set(WebViewConfig.DISABLE_SCANNER_ON_NAVIGATION, RhoConf.getString(DISABLE_SCANNER_NAVIGATION));
|
728
741
|
if (RhoConf.isExist("iswindowskey"))
|
@@ -17,6 +17,8 @@
|
|
17
17
|
#include "unzip/zip.h"
|
18
18
|
#include "db/DBAdapter.h"
|
19
19
|
|
20
|
+
#import "../impl/NotificationSingleton.h"
|
21
|
+
|
20
22
|
|
21
23
|
#undef DEFAULT_LOGCATEGORY
|
22
24
|
#define DEFAULT_LOGCATEGORY "System"
|
@@ -438,13 +440,10 @@ extern "C" void Init_System()
|
|
438
440
|
{
|
439
441
|
rho::CSystemFactoryBase::setInstance( new rho::CSystemImplIphoneAccessFactory() );
|
440
442
|
Init_System_API();
|
441
|
-
|
443
|
+
|
444
|
+
[NotificationSingleton init_notification_object];
|
445
|
+
|
442
446
|
#ifndef RHO_NO_RUBY_API
|
443
447
|
RHODESAPP().getExtManager().requireRubyFile("RhoSystemApi");
|
444
448
|
#endif
|
445
449
|
}
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
@@ -9,6 +9,7 @@
|
|
9
9
|
|
10
10
|
#include "common/RhodesApp.h"
|
11
11
|
#include "logging/RhoLog.h"
|
12
|
+
#import "common/RhoConf.h"
|
12
13
|
|
13
14
|
#undef DEFAULT_LOGCATEGORY
|
14
15
|
#define DEFAULT_LOGCATEGORY "Alert"
|
@@ -510,4 +511,13 @@ static NotificationReminder* reminder = nil;
|
|
510
511
|
[Rhodes performOnUiThread:runnable wait:NO];
|
511
512
|
}
|
512
513
|
|
514
|
+
|
515
|
+
+(void) init_notification_object {
|
516
|
+
if (rho_conf_is_property_exists("ios_request_notification_permission_on_start")!=0) {
|
517
|
+
if (rho_conf_getBool("ios_request_notification_permission_on_start")!=0 ) {
|
518
|
+
NotificationReminder* rem = [NotificationReminder instance];
|
519
|
+
}
|
520
|
+
}
|
521
|
+
}
|
522
|
+
|
513
523
|
@end
|
@@ -40,6 +40,9 @@ namespace rho {
|
|
40
40
|
virtual void stopListening(apiGenerator::CMethodResult& oResult) {
|
41
41
|
stopApplicationMessageNotifications(oResult);
|
42
42
|
}
|
43
|
+
virtual void cleanStartParameters(rho::apiGenerator::CMethodResult& oResult){
|
44
|
+
|
45
|
+
}
|
43
46
|
|
44
47
|
private:
|
45
48
|
void sendApplicationMessage(const String& appName, const String& params, apiGenerator::CMethodResult& oResult) {
|