Can Amplitude track event from keyboard extension? - swift3

I can track/record event from container app by Amplitude. I use the code bellow
Amplitude.instance().logEvent("Launch")
but when I write the bellow line
Amplitude.instance().logEvent("Share Catmoji Keyboard Extension")
in keyboard extension
The event does not record in amplitude dashboard.
Can anyone faced this issue? please help me.

Yes you can log events from App Extensions. I know this works in share extensions in production. You have to initialize Amplitude in the viewDidLoad of the principal view controller. According to the Amplitude docs this should work for all App Extensions except WatchOS, so I would imagine if you intialize Amplitude in your UIInputViewController subclass's viewDidLoad method it would work:
Amplitude.instance().initializeApiKey("{YOUR_API_KEY}")

Related

AgGrid Detect changing on columns/filters/sortings events

I'm using ag-grid and I'd like to save the layout/state of the user. Pretty much something like this
This solution forces the user to click on the button to save the preferences ("Save state"). There is some other way/event to detect that the user changed the state of the table (in order, to me to save and avoid to force the user to click on a button for that)?
I was hopping to find some method here but i didn't..
I initially had code that listened to all of the applicable events from the grid, but ultimately, I found it easier to just save the entire grid state in the component's onDestroy method, regardless of whether anything has actually changed.
Found my answer here.
All the events are here but i prefer to add a global event:
addGlobalListener(listener) Add an event listener for all event types coming from the grid.)
Source: AgGrid javascript grid api

Changing Interface Orientation for BW::Media Modal in RubyMotion

I have a RubyMotion application that is completely portrait (no landscape), but loads BW::Media.play_modal for an external MP4 video URL that I'd like to play in landscape mode.
It's loaded like this using RMQ, PM, and BW:
def on_load
rmq(#object).on(:tap) do
BW::Media.play_modal(#object.video_url)
end
end
I know how to enable autoRotate for an entire screen/controller, but is there a way to force landscape mode only when the modal is played?
Thanks in advance for any help!
Here's how I ended up solving the problem-
I enabled landscape_left and landscape_right throughout the RM app.
I set the should_autorotate method to false throughout the app.
I added a condition using PM's modal? method that set should_autorotate to true when a modal was active.
I used RMQ's rmq.orientation.landscape? method to set the view back to portrait as soon as the modal was exited.
I hope this helps if anyone else has the same problem!

ArgoUML signal in activity diagram

I'm working on a activity diagram that shows model/view transitions. I've done a lot of class diagrams with ArgoUML and want to do this with ArgoUML, too.
For a user input I would usually use an input signal. In ArgoUML 0.34, I can not figure out how signals work. There is no input/output signal component.
How can I show listener events like user input or a model event that leads to an UI update?
It should look like that:
There are a number of elements which are under pulldown menus instead of being directly on the tool bar. The pulldown to the left of the Guard element on the toolbar has all the Events on it. The default tool is the Call Event, but there's a Signal Event underneath as well. Is that what you're looking for?
I have the same question. I've been unable to figure out the correct procedure to model input/output signals in ArgoUML.
I've copied the layout from the original post but wasn't able to change the shape of the symbols:

How do you force Infragistics UltraWebGrid to databind if you handle the InitializeDataSource event?

I am using Infragistics UltraWebGrid. I've handled its InitializeDataSource event with a function that fills the grid's DataSource property. Great. That works. When the grid determines that it needs data it goes and gets it.
My issue is that there are times where, because of actions taken on the page, I need to go back to storage and get new data. When I do this supplying the data I want to use to the DataSource property and then calling DataBind nothing happens. The grid does not bind itself to its DataSource.
Is there an incantation of code that will force UltraWebGrid to bind to its DataSource while still handling the InitializeDataSource event?
Thanks for the suggestions. I ended up find the solution (with a little help from a co-worker). Here is the code (sorry for the VB):
grid.DataSource = Nothing
grid.DataBind()
grid.Clear()
grid.DataSource = theNewDataSource
grid.DataBind()
Apparently you need to reset the DataSource and call Clear before setting the DataSource to your desired source and calling DataBind().

Passing the "enter key" event to flash player in an ATL Window?

I have a Flash player (flash9.ocx) embedded in an ATL window and have coded functionality into the swf to respond to the return/enter key being pressed.
Works fine from the standalone swf player but as soon as its played from within my embedded player it doesn't execute. It's as if my window is getting in the way somehow?
Is there any way to pass the keypress through to the player?
FYI, there isn't anything to weird in place on the form.
Thanks!
I'm not VC++ developer, but I use Flash a lot.
Though not sure, it seems that the embedded player doesn't have the focus. Make sure you've got this part covered on the Flash side of things:
the stage exists ( you movie is properly initialized)
you set the KeyboardEvent listener to the stage.
You could use the FocusManager to make sure you've got the focus.
I don't know if you can pass the focus from you app to the SWF OLE through some tabIndex or something.
If still this doesn't work you can try using the External Interface to add callbacks from your app to flash player ( basically call and actionscript function from your app ).
This was achieved through fscommand before, but External Interface seems to be the thing to use now.
Good luck!
I don't use flash a lot but i'm a C++ programmer. =)
Let's see if I can help you.
I believe that your application is catching all the events before your flash movie. I don't know if there is a better way to do this but you could listen for any keyboard event on your form and use the SetVariable of your ActiveX component to set a variable inside Flash. Then, in the Flash Movie you could set a watch for any changes on this variable and trigger your Enter event.
Hope this helps.