POST
|
I want to connect to other devices using bluetooth, how can this be done in appstudio?
... View more
10-24-2018
08:45 AM
|
0
|
4
|
606
|
POST
|
Good Day All, I want the device's location to be automatically turned on and displayed when the app is opened rather than having to click on a button or click in the mouse area. How can I do this? I am a bit lost as to how to do this. Any guidance is appreciated. Thank you.
... View more
10-23-2018
12:46 PM
|
0
|
1
|
287
|
POST
|
Hi, I have adjusted the code and I know it is working since I have tested it randomly using: onClicked: { if (password.text !== SecureStorage.value(password.text)) { loginButton.text =password.text } So I am not sure why when I use the code below, it is not working var component = Qt.createComponent("Child.qml") var window = component.createObject (root) window.show ()
... View more
10-17-2018
07:54 AM
|
0
|
1
|
575
|
POST
|
Thank you Paul for an indepth response I do want the login to be as simplistic as possible however there will be a few more options added to the login page (this is just for testing) and yes, there is the potential that the login may be redundant but it will be purposely done like that due to the nature of the app. No sensitive information will be ascertained from the app and information will be shared among each other so that is not a problem. Also, you are totally right about retrieving the stored password and yes, I as I am testing it, I am understanding it more.
... View more
10-16-2018
01:13 PM
|
0
|
0
|
575
|
POST
|
I switched the code up so that it can read onClicked password.text = true When I run the code, nothing but this (the picture) happens.
... View more
10-16-2018
12:24 PM
|
0
|
4
|
575
|
POST
|
Hi I tried and nothing showed up. Any ideas on how I should move forward?
... View more
10-16-2018
12:08 PM
|
0
|
5
|
575
|
POST
|
Good Day, I want to create a very basic app login hence I am looking for alternatives to OAuth, Token Auth etc. I just want a login page with a Username and Password. That's it, nothing else. Therefore, I decided to use Secure Storage with the thought process being.......a username and password is stored by a user initially. When the user opens the app in the future, they enter the same user name and password and hit 'Login'. So, this login checks the keychain to ensure the password is correct and then allows access to the app by opening a new window. I modified the Secure Storage code to include a 'Login' Button however nothing happens when I hit Login. Therefore, I assume that the problem lies with the Login button. Can I be guided on how to fix this? Thank you. Below is the code: import QtQuick 2.7 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.1 import QtQuick.Controls.Material 2.1 import QtGraphicalEffects 1.0 import QtQuick.Dialogs 1.2 import QtQuick.Window 2.1 import ArcGIS.AppFramework 1.0 import ArcGIS.AppFramework.Controls 1.0 //import Esri.ArcGISRuntime 100.1 import ArcGIS.AppFramework.SecureStorage 1.0 import "controls" as Controls App { id: app width: 400 height: 750 function units(value) { return AppFramework.displayScaleFactor * value } property real scaleFactor: AppFramework.displayScaleFactor property int baseFontSize : app.info.propertyValue("baseFontSize", 15 * scaleFactor) + (isSmallScreen ? 0 : 3) property bool isSmallScreen: (width || height) < units(400) property string insertSuccessMessage: qsTr ("Inserted into Keychain") property string removeSuccessMessage: qsTr ("Removed from Keychain") property string failMessage:qsTr("Something Went Wrong") property color successColor: Material.color(Material.Teal) property color errorColor: Material.color(Material.DeepOrange) Page { anchors.fill: parent header: ToolBar{ id:header width: parent.width height: 50 * scaleFactor Material.background: "#8f499c" Controls.HeaderBar{} } // sample starts here ------------------------------------------------------------------ contentItem: Rectangle { anchors.top:header.bottom ColumnLayout { spacing: 5 * scaleFactor anchors.horizontalCenter: parent.horizontalCenter // Insert key in this text field TextField { id: username placeholderText: "Username" echoMode: passwordVisible.checked === true ? TextInput.Normal: TextInput.PasswordEchoOnEdit Material.accent: "#8f499c" Layout.topMargin: 100 * scaleFactor Layout.fillHeight: true Layout.fillWidth: true } // Insert value in this text field TextField { id: password echoMode: passwordVisible.checked === true ? TextInput.Normal: TestInput.PasswordEchoonEdit placeholderText: "Enter password" Material.accent: "#8f499c" Layout.fillHeight: true Layout.fillWidth: true } //Click on the button to store key and value in the keychain Button { id: saveButton text: qsTr("Save Data to Keychain") onClicked: { SecureStorage.setValue(username.text, password.text) } } Button { id: loginButton text: qsTr ("Login") onClicked: { if(password.text === true) { var component = Qt.createComponent("Child.qml") var window = component.createObject (root) window.show () } } } } } } }
... View more
10-16-2018
10:20 AM
|
0
|
7
|
714
|
POST
|
Will check that out. Yes I have put forward the question, however no one from the team replied.
... View more
10-11-2018
10:22 AM
|
0
|
0
|
531
|
POST
|
Hi, I tried the "mapLocation" property (var point = mapView.locationDisplay.mapLocation) and I am getting 0,0 now. In the greater scheme of things, atleast it's not null however still can't figure out why I can't get the correct geometry. Also, how do I check the addFeatureStatus?
... View more
10-11-2018
08:06 AM
|
0
|
2
|
531
|
POST
|
Correct me if I am wrong, I believe that the problem lies in the mapView.locationDisplay.mapPoint; var feature = featureTable.createFeatureWithAttributes(featureAttributes, mapView.locationDisplay.mapPoint);
I came to this conclusion because if I replace var feature = featureTable.createFeatureWithAttributes(featureAttributes, mouse.mapPoint) I can add random features and it works fine.
What are your thoughts?
... View more
10-10-2018
12:04 PM
|
0
|
5
|
531
|
POST
|
It is, however unintentionally. This problem was re-worded as well as the code was changed and posted in the forum as another question.
... View more
10-10-2018
09:47 AM
|
0
|
0
|
524
|
POST
|
Good Day, I have been using the code below to zoom to the device's location and add a point feature based on the device's current location by clicking any where on the screen. The feature is being added to the service table however there is no/null geometries for each point therefore it is not showing up on the map. How can I fix this? import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Controls.Material 2.1 import QtQuick.Layouts 1.1 import QtGraphicalEffects 1.0 import ArcGIS.AppFramework 1.0 import ArcGIS.AppFramework.Controls 1.0 import Esri.ArcGISRuntime 100.2 import QtPositioning 5.3 import QtSensors 5.3 MapView{ id: mapView Map{ id: map initUrl: "http://melbournedev.maps.arcgis.com/home/webmap/viewer.html?webmap=24ba3f20e7424c67989e64ec740384f8" FeatureLayer { id: featureLayer selectionColor: "cyan" selectionWidth: 3 // declare as child of feature layer, as featureTable is the default property ServiceFeatureTable { id: featureTable url: "https://services1.arcgis.com/NUSHso3rgWERZOFF/arcgis/rest/services/TestPoint1/FeatureServer/0" // make sure edits are successfully applied to the service onApplyEditsStatusChanged: { if (applyEditsStatus === Enums.TaskStatusCompleted) { console.log("successfully added feature"); } } // signal handler for the asynchronous addFeature method onAddFeatureStatusChanged: { if (addFeatureStatus === Enums.TaskStatusCompleted) { // apply the edits to the service featureTable.applyEdits(); } } } } } locationDisplay { positionSource: positionSource compass: compass } PositionSource { id: positionSource active: true property bool isInitial: true onPositionChanged: { if(map.loadStatus === Enums.LoadStatusLoaded && isInitial) { isInitial = false; zoomToCurrentLocation(); } } } Compass { id: compass } function zoomToCurrentLocation(){ positionSource.update (); var currentPositionPoint = ArcGISRuntimeEnvironment.createObject ("Point", {x: positionSource.position.coordinate.longitude, y: positionSource.position.coordinate.latitude, spatialReference: SpatialReference.createWgs84()}); var centerPoint = GeometryEngine.project(currentPositionPoint, mapView.spatialReference); var viewPointCenter = ArcGISRuntimeEnvironment.createObject("ViewpointCenter",{center: centerPoint, targetScale: 10000}); mapView.setViewpointWithAnimationCurve(viewPointCenter, 2.0, Enums.AnimationCurveEaseInOutCubic); } //! [AddFeaturesFeatureService new feature at mouse click] onMouseClicked : { // mouseClicked came from the MapView // create attributes json for the new feature var featureAttributes = {"Name" : "Test"}; // create a new feature using the mouse's map point var feature = featureTable.createFeatureWithAttributes(featureAttributes, mapView.locationDisplay.mapPoint); // add the new feature to the feature table featureTable.addFeature(feature); } }
... View more
10-10-2018
08:29 AM
|
0
|
7
|
704
|
POST
|
Good Day, How can I get a position/location point from the locationDisplay? I want to get that point. I am using the code below but I nothing happens when I click the button. import QtQuick 2.7 import QtQuick.Controls 2.1 import QtPositioning 5.3 import QtSensors 5.3 import ArcGIS.AppFramework 1.0 import ArcGIS.AppFramework.Controls 1.0 import Esri.ArcGISRuntime 100.2 App { id: window visible: true //Create MapView that contains a Map MapView { anchors.fill: parent //Nest the Map as a child of the MapView Map { //Nest the ArcGISTiledLayer to add it as one of the Basemap's baselayers ArcGISTiledLayer { url: "https://services.arcgisonline.com/arcgis/rest/services/Polar/Antarctic_Imagery/MapServer" } } locationDisplay { positionSource: PositionSource { id: ps } } onStatusChanged: { if (loadstatus === Enums.MapStatusReady) { ps.active = true; } } } Button { anchors { left: parent.left top: parent.top margins: 10 } text: "get point" onClicked: { var point = mapView.locationDisplay.mapPoint; console.log("x", point.x, "y", point.y, "wkid", point.spatialReference.wkid) } } }
... View more
10-08-2018
10:37 AM
|
0
|
4
|
668
|
Title | Kudos | Posted |
---|---|---|
1 | 09-26-2018 01:02 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|