How to Send a Glympse from the Automate App - android-activity

From the app Automate, I would like to send a Glympse. Automate's App Start block takes the following inputs. I assume not all of them have to be specified.
Package
Activity Class
Action
Data URI
Mime Type
Category
Extras
Flags
What should I set for the above values?
I am reading some code and looking at some documentation. I figured out that the Package should be com.glympse.android.glympse and the Activity Class should be com.glympse.android.intent.Create. The extras input should be set to a dictionary object. The dictionary should have a message key with a string value. The duration key has a long value which holds the number of milliseconds to share the location. I haven't figured out the rest of the keys or their formats.

Here are the steps...
Create a dictionary named recipient with these keys:
type with a string value of sms
address with a string value of 5425551212 // replace with the actual phone number
Create another dictionary named options with these keys:
recipients with a string value of jsonEncode(recipient) // this will convert the recipient dictionary into a JSON string
message with a string value of whatever you want to say
duration with a long value of the number of milliseconds to share the Glympse location (e.g. 1800000 for 30 minutes)
Use the App Start block with the following inputs:
Package is set to com.glympse.android.glympse
Activity Class is set to com.glympse.android.intent.Create
Action is set to Run
Extras is set to options // the dictionary created above
This will cause the Glympse screen to show up so that the user only has to hit the Create button.

Related

How to parse the string content of debugDescription in XCUITest swift

As debugDescription returns the XCUIElement UI Tree and this if of type String.
Want to fetch specific information based upon parameters like label :[String] will return all the label values, find_Application - will return the bundleID etc
You can use element.snapshot().dictionaryRepresentation which gives a parsed version of output of element.debugDescription or element.snapshotDescription.
You can use element.snapshot().children to get the child element's snapshots iteratively if you want to create your own parser.

how to do an auto increment of id inside of class?

I am making a todo app with notifications and am using flutter local notifications plugin, How do I generate a unique integer as id for a specific todo so that I can also cancel notification of that specific todo using that unique integer. and the value f the integer must be an int which and the first value must be 0 and then it increment by one .
i used
class data {
final String name = "test" ;
final notificationId = UniqueKey().hashCode;
}
but it gives random values and in my case i need values starts from 0 and increment by 1 .How to do it ? is there any others packages
you can use Shared Preference to store last int value and increase it on next notification, i hope that will help you.
If you are using local database to store notification, then create a column of int type with auto increments, and use that id to cancel that notification
For your reference read here about Shared Preference

How to get all keys values of the player prefs in unity [java script ]

in the first test game I've developed if the player passed all the levels and win , he must enter his name ... so his name and his score will be stored in a player prefs :
there is another scene that displays the names and scores of all the user passed the game :
I've searched from the morning and try all the ways I know and finally I failed to perform this .... is it possible to display all the keys values previously stored in the player prefs ???
or can someone provide me by a JavaScript to do this ????
thanks...
The easiest way is to create your high score structure the way you want to, serialize it to string using json and save that string in playerprefs
use either of these to serialize
http://json.codeplex.com/
System.Runtime.Serialization.Json
You can use a custom script called ArrayPrefs2 on the Unity3D Wiki to store arrays of data as a value in a PlayerPref's key.
Using this method you don't need to try to figure out how to pull heaps of random PlayerPref key\values. For your case you could have two key->Value pairs as such:
HighScoresName \\ String array
HighScoresValue \\ int array

What are the rules for a valid variable name in mirth?

I am trying to set up a transformer on a Database Reader to file writer channel. I am reading in a sql field called MRN which I would like to send to a variable called mrn. I added a step to a channel with a variable called tmp['MSH'] mapping to a variable called msg['MSH'] But mirth is giving me the error message:
The variable name contains invalid characters. Please enter a new variable name
What are the rules for a valid variable name in mirth?
tmp and msg are two built-in variables containing E4X mappings of the outbound template and inbound message, respectively. You would map, via a MessageBuilder step, from inbound to outbound with tmp['MSH'][...] = msg['MSH']... where ... refers to the appropriate sections. Essentially these are pre-populated javascript property arrays.
If you really want to create a variable for use in multiple places, the rules are alphanumeric plus '_', I believe.
In a MessageBuilder step, you could refer to a previously created variable with ${varname}.
I would recommend investing a little time in getting familiar with the basics. Documentation is wanting, to be sure, but this blog post series are a good place to start.

Open XML document ContentControls problem with signed id's

I have an application that generates Open XML documents with Content Controls.
To create a new Content Control I use Interop and the method ContentControls.Add. This method returns an instance of the added Content Control.
I have some logic that saves the id of the Content Control to reference it later, but in some computers I've been having a weird problem.
When I access the ID property of the Content Control I just created, it returns a string with the numeric id, the problem is that when this value is too big, after I save the document, if I look through the document.xml in the generated document, the <w:id/> element of the <w:sdtPr/> element has a negative value, that is the signed equivalent of the value I got from the Id property of the generated control.
For example:
var contentControl = ContentControls.Add(...);
var contentControlId = contentControl.ID;
// the value of contentControlId is "3440157266"
If I save the document and open it in the Package Explorer, the Id of the Content Control is "-854810030" instead of "3440157266".
What have I figured out is this:
((int)uint.Parse("3440157266")).ToString() returns "-854810030"
Any idea of why this happens? This issue is hard to replicate because I don't control the Id of the generated controls, the Id is automatically generated by the Interop libraries.
When displayed in 32-bit binary format, -854810030 and 3440157266 are just the same!
This problem is mentioned in the MSDN documentation of the ContentControl.ID Property:
When you get the ID property value at runtime, it is returned as an unsigned value. However, when saved into the Office Open XML file format, it is saved as a signed value. If your solution attempts to map programmatically returned values to values saved in the file format, you must check for both the unsigned and signed version of the value obtained from this property.
As Claude Martel mentioned, -854810030 and 3440157266 are ident. You can easily check this by casting the signed Int32 to a unsigned UInt32:
var id = Convert.ToInt32("-854810030 ");
UInt32 uId = (uint) id;
Assert.AreEqual(3440157266, uId);
I've had the very same type of issue in the past. The ID is unreliable as it doesn't seem to perpeturate. What I did instead is stored a name of the Content Control's .Tag so I could access it later.