It's unclear whether the Timeline features are supported when using only the pebble.js approach (e.g. no C code). Can anyone comment?
Yes, you can use Pebble.js to call regular PebbleKitJS functions (e.g., Pebble.getTimelineToken).
As far as pushing pins to the timeline, pins are pushed via the timeline Web API, which means you can use the ajax function to make a request to the API from within Pebble.js.
Related
I'm trying to get my head around Avalonia in general, and the Reactive UI integration in particular. From googling around, I understand that Avalonia pulled away the Avalonia support in ReactiveUI, and tries to integrate ReactiveUI into Avalonia itself, to support a sometimes unstable Avalonia API.
I'm implementing a flow where a double tap on a DataGrid row should open a details windows, which I can do by adding a handler for the DoubleTapped event in the code behind. However, I was wondering if I could do this in a Reactive UI way, in a WhenActivated() implementation, by observing the DoubleTapped event.
In the ReactiveUI documentation, I see that there is a Pharmacist integration, which generates the observables for these events. However, when I fetch a reference to the DataGrid in the code behind, and try to hook into the DoubleTapped via
myDataGrid.Events(). ..., I don't get to see any events. Does this imply that there's no such support in Avalonia at this time?
Finally, while I'm at it, if I forget about the Reactive UI support, and use a straight-forward event handler, I need to do some stuff to detect whether it was a row that was double tapped, or something else (such as the header). I have to do this, because there's no EventSetter implementation in Avalonia as I understand it.
Somebody who knows if Avalonia will support this in the future?
Edit: in the end I used ReactiveUI somewhat similar to
TreeView.GetObservable(DoubleTappedEvent)
.Subscribe(async x =>
{
var selectedItem = TreeView.SelectedItem;
if (selectedItem is TreeNodeViewModel treeNodeViewModel)
{
await ViewModel!.ActivateResource(treeNodeViewModel);
}
}).DisposeWith(d);
An attached behaviour can also help to bind events to perform logic. There is a sample that looks like it could work provided the DoubleTappedEvent is being fired.
Avalonia Docs - Creating and binding Attached Properties
The dev tools should help show the event your are looking for tunnel and bubble though the DataGrid?
Pharmacist does not support Avalonia. They are working on ReactiveMarbles.ObservableEvents, which as of right now, doesn't work on generic classes, but they're working on fixing it.
Does the API expose the ability to set the mode to Away or Home?
I don’t see this listed in the API documentation. I think this functionality is important as it now only allows you to turn off your thermostats but also configure alerts via the mobile app (I have mine set to only send alerts for my NestCams when I’m away).
You can't set "away", but you can set the thermostat to either Eco or Off.
No. I also hope the old functionality of the Nest API's will be available on the new API. The motion/person per zone is also missing for example.
There's no way to explicitly set that in this new API. Google wants you to use their Home/Away Routines instead, though I don't think all of the old use cases are supported yet (or will be).
https://support.google.com/googlenest/answer/10071816
I'm new to the Xamarin. I need to create a small application to make use phone resources and google map.
For resources access like, call, sms, flash on/off you can make use these
phoneDialer.MakePhoneCall(phoneNo);
smsMessenger.SendSms(phoneNo, smsMessage);
CrossLamp.Current.TurnOn();
CrossLamp.Current.TurnOff();
I think this will help you get some idea. You can also create a utility class where you can create a function and make use these for all platform and you can call the corresponding functions whenever it is necessary.
How to call a Javascript function (and register a callback function to be executed after the method execution from web view is done) inside an webview on nativescript?
First the bad new, nothing is "built" in to do this. This requires you to add some code to communicate back from the webview. In the nativescript-webworkers plugins that I wrote; the way I did it was I used the onJsConfirm function on Android. On iOS I used the userContentControllerDidReceiveScriptMessage callback to communicate back. If you want to develop your own code; just grab a copy of my webworkers plugin and you can see the way to do it.
Now to the good news, is that it appears there is already a plugin called "nativescript-webview-interface" which gives you this facility so you don't have to build all that binding code yourself. It looks like all you need to do is include it and you will have bi-directional communications with your webview on both iOS and Android.
Note; to see if a plugin exists in the NativeScript community; your best bet is to look on http://plugins.nativescript.rocks, that is how I found out about the above listed plugin.
I'm trying to build my Parse iOS project in a way that'll be more easy to migrate later on for the client should he desire it.
To that end, I'm trying to use the REST API instead of relying on PFUser and PFObjects.
But I love the PFLoginViewController-- it's such a time saver. Is there a way I can use that pre-built login/sign-up flow with the REST API instead of PFUser?
I don't think that u could use it without PFUser but u could create similar to that and time will be consumed.
Still One thing might work out, check this link and I hope you have already but this will show how to integrate the PFLoginViewcontroller so in that they have logInView which will provide you access to all component like loginButton, usernameTextField, passTextField and etc. So you could access to these component your own explicit component.
Like, you could create your own UIButton(namely, logInBtn with action selector and all) then access it to logInView.LogInButton = logInBtn(your own button) and in this button's action you could make Rest api calls for login, and similarly for other component which needs to be modified for your requirement.