I am doing a study about the ThingsBoard features and I'm working on a particular scenario:
I have several devices (thousands) and I want to advertise them when a new firmware is available. To do so, I want to modify, through the dashboard, all the shared attributes named "fwVersion" (linked to the devices) with the new FW version.
Is it possible to do it globally with one specific widget for instance? (Of course, I don't want to manually modify the shared attribute for each device)
Thank you for your time and help.
You could try setting up an alias which is populated via a device query so it contains all the devices you're interested in. Then use that alias as the input to an update shared attribute widget.
Note I have not tried this, but I noticed dashboard aliases can be populated from queries and are always used as the inputs to widgets.
Related
I have app that lets users to add widgets, my widgets are configurable (they can present different content), I want to limit amount of widget instances that can be added by user on single device
is there any way for it as I didn't find anything related to that in Apple documentation about widgets and widgetConfiguration?
possible solution:
Store some variable with amount of already added widgets in UserDefaults. It won't prevent from adding new widgets but will help to show some information about limitations for user.
This is impossible. You don’t know when widgets are created or removed; you only know when their timelines are reloaded. If you use ConfigurationIntents, you’ll see that they have unique IDs, which may seem promising; but I can tell you from my own testing, if multiple widgets use identical configurations then you’ll only see the one configuration. So AFAIK, there is absolutely no way to know how many widgets are active at any given time.
I'm generating networks and importing them into Cytoscape using cyREST.
I have a lot of extra information available about each node, more than can be fit into node labels. I would like the user to be able to click on a node and bring up a detail panel with this additional info. Is there any feature of Cytoscape, or an existing plugin that can do that?
There is no easy way from within CyREST to do that, although you could encode that information in a single text column and then use the 'tooltip' visual property to provide a way for a user to get the information on a mouseover. Beyond that, you would need to provide an app to integrate with your CyREST application. Several apps do exactly what you are describing (e.g. look at StringApp for an example)
-- scooter
I work on an SDK which writes to NSUserDefaults. Occasionally a client's host app will bulk erase the standard NSUserDefaults, trampling on the SDKs data. The solution would seem to be to not use the "standard" user defaults. It appears you can use constructor init(suiteName:), but I read elsewhere that if you create an instance like this it will become shared across app extensions under certain conditions that the host may activate (for which my SDK would be unaware). I would need to keep them separate from each other if they're running in app extension(s), but changing a key name or the suite name isn't a good option because the SDK wouldn't intrinsically know which location it's running in. Is there a way to create a user defaults instance that behaves like standard but isn't standard?
App extensions have different bundle ID's. So you could use the bundle ID as a prefix to your suiteName.
Bundle.main.bundleIdentifier will give you the bundle ID of the current executable.
It remains unclear to me, how a Revit addin would know if there are other active local files (other active users) at runtime.
The plugin under consideration needs to provide all scheduled elements with their UniqueID in a shared parameter ‘SPuniqueID’ . The purpose being that this SPuniqueID can then be added to the schedule (it is a pity that it is not possible to add the UniqueID directly to the schedule via the Revit userinterface).
Next, the schedules, with field SPuniqueID added to the schedule, can then be exported to excel. Because SPuniqueID, containing the UniqueID, is added to the excel table, it is possible to then write a ScheduleCompare program, to compare 2 quantity surveys, generated on different moments in the lifetime of the revit project and find the differences (quantities that have changed for certain articles).
I already built this ExportSchedules plugin to work flawless on a standalone revit file, working even with linked elements from revit links. When I run this on a local copy of a central model however, I get of course an exception that some elements are borrowed by other users and that the SPuniqueID can’t be set.
I want to check beforehand if I have full rights on all the scheduled elements.
Is ‘WorksharingUtils.CheckoutElements()’ operating on the list of scheduled elements and catch exceptions, the only way to accomplish this?
I thought there maybe was a log file somewhere that would track the active local users. If and only if this list contains only my name, I would let the plugin proceed, because I would then automatically know all the elements are available for editing.
Kind regards
Paulus
Paulus,
Check out the WorksharingUtils.GetCheckoutStatus() method - it can tell you whether the element is checked out, and if so which user.
Beyond that, the only other place to go is by monitoring the SLOG file in the Central File folder (but - yuck!).
Best Regards,
Matt
I need to share some sensitive data among activities.
I have two EditText which are basically username and password
I am consuming a webservice which on the base of provided username and password return some user info (DataType:String). Like userid,useremail etc.. which is basically in CSV format
I need these piece of information throughout my application.But i can't figure out which is the better way.
-- One way i could found out so far is to use sqlite with MonoAndroid
-- Other way i found out is using Application class
I just started to learn android today , but i want to know if there are some other ways to share data ?
As you mentioned, a global Application class and the database are two good ways to share application-wide data. One thing to be careful with is that your Application class could be recycled when the app is in the background, so you would lose any data that hasn't been persisted to something more permanent.
In addition to the database, you can also persist data down to the filesystem as well. This recipe from Xamarin has an example of writing directly to a file. Most of the classes you'll need to do file access are found in the System.IO namespace. Mono for Android also supports isolated storage, which provides a higher level API for reading and writing files.
If you simply need to pass data directly between activities, you can do so by adding it as an extra to the intent. This recipe explains how to do that.
If you want to wrap up access to a particular resource in a more managed fashion that can be accessed by either other parts of your application or even external applications, you can look into implementing a content provider. Android itself provides several built-in content providers for resources like contacts and media, if you need an example of what it's like to use one. This recipe explains how to read from the contacts provider.