how can i use volume keys and camera key in app ?
i use -36 and - 37 constant value but it`s not work !!!
i use this to get key name
str = getKeyName(keyCode);
but when i press volume keys or camera key it`s return null
can any body help me
thanks
On what platform? What kind of keyboard? This is an implementation-specific question; there's no standardized keycode for a volume key as it's not part of the standard 101- or 104-key layouts. (And even then, keycodes vary between countries and languages.)
It's very, very rare that mobile phones allow MIDlets to get access to such buttons as volume and camera.
If your mobile phone supports this, it should call function keyPressed(int keyCode) of Canvas. If you somehow output the code, you will be able to use it.
I'll say once again that it's very rare, and if some mobile phone supports the keys, others won't.
Related
Used "^%{L}" for performing cntrl+Alt+L in BluePrism but the required window is not opening up, the command is working fine in general when executed manually.
First of all, you need to make sure that you are following the appropriate steps to send keys to an application. The recommendation is to first activate the application (this ensures the keys are sent to the proper application), then use a wait stage (this ensures that BluePrism is sending the keys at the right time; i.e. when the application is ready to accept keys), then use the navigation stage on the root application where the send keys is located, something like this:
(If you are typing in a specific field in the window, then use an additional Focus navigation stage on the Field itself before sending keys).
Within the navigation stage, you have two possible options to send keys:
Global Send Keys
Global Send Key Events
Global Send Keys
You can find the official guide (section 10.2) on the BluePrism portal. It doesn't really detail the sending of combination keys for Global Send Keys, but you really have to do it like this:
^(%l)
Do note that if you send ^(%L), this is similar to sending Ctrl+Alt+Shift+L. The parens indicate that for the keying of %l, Shift is held down. The above is equivalent to ^(%(l)). Normal keys do not require braces either, and they cause issues if used in Global Send Key Events (i.e. {L} means Shift+L in Global Send Keys, but will give you an error in Global Send Key Events).
The relevant part of the guide:
So what you were doing with ^%{L} didn't really make sense to BluePrism. It was probably sending Ctrl+Alt, then separately Shift+L (I cannot really confirm this, but this is my guess following testing on BluePrism which definitely show it doesn't work, however).
Global Send Key Events
You can find the documentation in the same guide and section I linked earlier. This time, it does show exactly how to send combination keys, so for your case, the other option with Global Send Key Events will be:
<{CTRL}<{ALT}l>{ALT}>{CTRL}
I don't really like Global Send Key Events because it's longer to type and you have to be careful about more things, but essentially, it becomes easier if you type the opening and closing syntax before proceeding with the next key. For example to do the above, it's easier to first type <{CTRL}>{CTRL}, then insert the ALT part in the middle: <{CTRL}<{ALT}>{ALT}>{CTRL}, then insert the l (do note here that l and L are equivalent here, which is also weird considering that they are not in Global Send Keys).
I presume that it's a GLOBAL SEND KEY EVENT value that you're looking for.
This is shift+I action value:
"<{SHIFT}I>{SHIFT}"
I would try for ctrl+Alt+L maybe something like this:
"<{CTRL}{ALT}L>{CTRL}"
the "<" & ">" is Push down & Release
Global Send Keys is going to send the keys to whatever application has focus on screen, so I would recommend:
Set focus on the desired window by either using a Navigate stage to "Activate Application" or "Global Mouse Click".
Use Global Send Keys
Keep in mind that a Global Mouse Click could again result in something unexpected as its sending the event directly to the screen, and another application/window might be covering the area you've just clicked.
For more info on Global Send Keys and Global Send Keys Event I would read the BluePrism manual for this: Send Keys and Send Key Events
It might also be worthwhile studying some surface automation principles as it can help get you a better understanding of what these Global actions are doing: Introduction to Surface Automation
Activate the application using navigate stage.
Add a 1sec wait between activate and send keys.
Use global send keys event. <{ctrl}<{alt}L>{alt}>{ctrl}
Ensure you are using the root element in Application Modeller (the first at the top of the list) and not any of the child elements. Use a navigate stage with that element and either Global Send Key or Global Send Key Event action. The syntax "^%{L}" is otherwise correct, although you don't say what is it that you are trying to automate (Excel, Word, IE, Citrix...??).
Try to use Global SendKey instead of G.S.Events. I.e. SHIFT+HOME = "+({HOME})"
regular brackets needed for blue prism to understand where to release Shift ("+").
TV device does not support touch operation, users have to use Remote Control. We need to move focus by press left, top, right, bottom direction key, and when the target widget get focus, we will press OK button to response kinds of key event. But I cannot find any flutter interface to solve this interaction, anyone who can help me?
There are SystemChannels for this.
I haven't tried it myself, but it looks like this should do what you need:
DartDocs - SystemChannels.keyEvent
A JSON BasicMessageChannel for keyboard events.
[DartDocs - SystemChannels.textInput[(https://www.dartdocs.org/documentation/flutter/0.0.41-dev/services/SystemChannels/textInput-constant.html)
A JSON MethodChannel for handling text input.
This channel exposes a system text input control for interacting with
IMEs (input method editors, for example on-screen keyboards). There is
one control, and at any time it can have one active transaction.
Transactions are represented by an integer. New Transactions are
started by TextInput.setClient. Messages that are sent are assumed to
be for the current transaction (the last "client" set by
TextInput.setClient). Messages received from the shell side specify
the transaction to which they apply, so that stale messages
referencing past transactions can be ignored.
The later is used in https://github.com/flutter/flutter/blob/4389f07024a4c69f7223401abd4d0ab3ecc45698/packages/flutter/lib/src/services/text_input.dart
There are known issues with physical keyboards thought that might cause this use case not to work
https://github.com/flutter/flutter/issues/11177
https://github.com/flutter/flutter/issues/7943
https://github.com/flutter/flutter/issues/9347
Yep,Flutter doesn't support D-pad navigation yet.But,I have an Android Smart TV and if I connect a Bluetooth mouse,I am able to navigate,swipes,click,etc my Flutter app on the TV.
I am trying to activate a view using Revit API. What I want to do exactly is to prompt the user to select some walls, but when the user is asked that, he can't switch views to select more walls (everything is greyed out at that point).
So the view I want to activate (by that I mean, I want this view to be actually shown on screen) already exist, and I can access its Id.
I have seen threads about creating, browsing, filtering views, but nothing on activating it... It's a Floor Plan view.
So far I can access its associated ViewPlan object, and associated parameters (name, Id, ..).
Is it possible to do ?
Thanks a lot !
Arnaud.
I think the most preferred way is the UIDocument.RequestViewChange() method. The tricky part about this is that unless you've designed your application to be modeless with external events or idling, it may not actually happen until later when control returns back to Revit from your addin.
(There's also setting the UIDocument.ActiveView property - not positive if this has different constraints).
The other way that I have done it historically is through the use of the UIDocument.ShowElements() command. The trick here is that you don't have control of the exact view - but if you can figure out the elements that appear only in that view, you can generally make it happen (even if you have to do a separate query to get a bunch of elements that are only in the given floorplan view).
Good Luck!
I think the solution to your problem may be:
commandData.Application.ActiveUIDocument.ActiveView = View;
The ActiveView is a property and it has {get and set} options.
ActiveView has only a get accessor, what Mostafa suggests will not work.
I have used the RequestViewChange() method with a modal dialog and have not had problems so far.
I'm working on an app and I want to display a male symbol or female symbol for a list of GKPlayers whose photo's can't be returned from GameCenter. Is there a way to determine the gender of a GKPlayer?
Not directly, No. (Even with private API.)
However: If you can use private API, then it looks like Facebook user ids MIGHT be available for players that have opted in:
https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/GameKit.framework/GKPlayerInternal.h (and GKPlayer.h, same place)
You might then be able to fetch gender info from Facebook.
The usual warnings about private API apply, of course: fragile, Apple won't allow it in the store, etc etc. Also, be aware that correlating a GK Player with external identity info violates the Game Center Terms of Service.
Actually, i have this url http://mydomain.fr/user/1 in my web application. I think it is not very safe
I would hide the id which is auto_increment.
To not be able to do that:
http://mydomain.fr/user/1
http://mydomain.fr/user/2
http://mydomain.fr/user/3
http://mydomain.fr/user/4
http://mydomain.fr/user/[...]
I do not know which technique to use...
Hash MD5 stored beside primary key
UUID / GUID
I use MySQL.
You should restrict access to URLs based on authentication. Just making it 'hard to guess' an ID will not prevent someone from accessing another user's page or, e.g., deleting an unexpected user. Basically, anyone will be able to access any URL unless you provide some access control.
I think generate a random unique string for a user is the best way.
simply use sha1 hash should be ok.
There is no way properly to hide it, you can generate unique ID with a long random hashed string, it's harder to guest. Basically that won't prevent someone to access other's ID.
OP may be concerned with divulging the primary keys because it could leak information into how many of a certain resource exists.
For example, if he is building a web app and someone creates an account and sees a url of domain.fr/user/23 they will know they have created an account on an application with low adoption.
My suggestion would be to either use a GUID value as suggested above or a username that is constrained to be unique.
If you use a GUID, it will look ugly, but make sure to not just use the beginning part as you could greatly increase the chance of collision since the first 60 bits are based on the timestamp.
If you use a unique username, your url would instead look like domain.fr/user/username
I know this is easily done on RoR.