Edit iOS notes via IMAP - iphone

I'd like to create and edit notes created by the iOS Note app programmatically from the server-side.
I can see the notes created by the iOS device in my IMAP folder but any changes I make won't show up on the iOS device.
Does such API exist?

I just wondered myself and tried editing the note with mutt. As emails (via imap anyway) are not meant to be edited (as correctly stated by #CodaFi) mutt copies the note into the editor, saves it as a new "email" and delete the old one. The edited note gets synced to Notes.app just fine.
Beware: The title/subject of the note/mail is derived from the first line of the body.
PS (I don't think it affects the validity of the above): My setup is private IMAP server & mbsync with local Maildir & mutt.

Well, I use the HeaderTools plugin with Thunderbird to accomplish this, so it's certainly possible. The notes app picks up the changes right away. ( I's not a very satisfying solution as HeaderTools only allows editing as html source in its own viewer/editor )
I guess you could fire up wireshark to investigate precisely what goes on.
The drafts theory sounds plausible. If I needed to dig into this, I think I would just try it out with python directly, instead of googling around for hours.

Related

OS11 replacement for RadioInfo?

Is there a replacement for the RadioInfo that was removed as of OS11? (com.android.settings/.RadioInfo)
If not, where else can this information be found in UI? Or adb? (preferably without rooting the device)
Our team relies heavily on the use of the data in RadioInfo for QA testing, especially since it works on nearly all Android devices (rather than being OEM-dependent like engineering short codes).
It also offered ideal granularity in network selection, moreso than the basic Settings UI.
Also, why was it removed? I looked back about 11 months in logs and didn't see a single mention of it (though maybe I'm looking in the wrong place - if there's a comment on it somewhere, please do share the link).
Looks like it just got moved.
10 and earlier:
com.android.settings/.RadioInfo
as of 11:
com.android.phone/.settings.RadioInfo

How to transfer Files from OPC UA Client to Server

I want to Download and Upload, for example a .txt file, with the UA-Expert Client to/from a Server which i have set up on a Device.
Could someone provide me a Step by Step solution or an example on how to implement this?
I first followed the tutorials from the open62541 website.
I tried to follow and understand the OPC-UA-Specifications, particularly Part 5 Annex C.
Thank you in Advance.
open62541 doesn't support this out of the box meaning that there is no pre-made plugin which implements the required Objects for the various platforms.
That said it isn't to much work to do it yourself (especially if you don't need something generic/cross platform).
I've done such a one-off a few months ago. It was like 2 days of work. It was limited to downloading specific files from the server.
If my memory serves me well all you need to do is to enable the generation of the types specified by part5/annex c (there is a .txt or .csv in the sourcetree containing all the types that should be generated), after that you need to instantiate such an object (File for example) and place it somewhere in your server address space. What is left to do is to implement the various methods (open, read, ...) And to hook up your objects with callbacks to these.
This feature was added recently, but is not yet included into the official release.
Have a look at: https://github.com/opcua-tsn-team-kalycito/open62541/tree/fileType_object_implementation
(Make sure to use the commit 76eb14f6886911f954c40492cbe346c69b055ba5; the latest commit is not working)
An example implementation is:
UA_StatusCode result = UA_Server_addFile(server, FileTypeNodeId,
UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
UA_QUALIFIEDNAME(1, "Sample File"),
oAttr, filePath, NULL, NULL
);

ReactJS 5.3.0 not loading from unpkg.com

We have been using the following library for months:
https://unpkg.com/react#15.3.0/dist/react.min.js
Yes - I know we can just reference 15.3 and get the URL rewrite to the latest, but they released a breaking change. That's another issue for another day. Don't get distracted.
Yesterday this simply stopped working. You'll notice that if you load the URL mentioned, that the file is TRUNCATED. Simply cuts off. This made everything we use react with break. Interestingly, if you go to the following URL (without the .js extension) - things work.
https://unpkg.com/react#15.3.0/dist/react.min
My question is - what the heck happened? Why did the URL we've been using for 8 months suddenly stop working, and who can we get to fix it. In the interim, we had a copy locally that we've started referencing (which we probably should have been doing to begin with, since we don't want the automatic upgrade). When things like this happen, who do you inform?
I'm not sure you'll find the answer as to why this file is no longer working here but based off of the website you could reached out to the creator on twitter: https://twitter.com/mjackson
On the website it says:
SUPPORT
unpkg is a free, best-effort service and cannot provide any uptime or
support guarantees.
i.e. you should probably only use this link if you are messing around with a small project and shouldn't be used for any website where you actually care about the uptime of the site.

Javamail to receive emails; whats wrong?

I am trying to create a very simple (text based for now) email app for receiving emails. So far i have used this code :
http://www.javaer.org/j2ee/3-javamail/8-javamail-connecting-gmail-using-pop3-with-ssl
The problem is that i when i run this code i am able to get the new emails, only for once. For example if i have a new message in inbox the first time i will this code it will show it but then it wont. Also it seems that i cant see the body contents of the emails which is strange. I was told that it should be better to use imap protocol but i am not entirely sure how.
Specified example really starts once and scans folder and exits (and see answer on POP that removes mail). From description you need some loop that periodically checks catalog and extracts new mails. Look at some swing examples in your JDK how to write window-based program with event loop. You can start dedicated thread that once per minute checks POP server catalog

How to create a contact in the "local" addressbook?

I am wanting to create a contact programmatically into the "local" addressbook (so that it doesn't try to synch, which causes some compatibility issues with Exchange).
If a local addressbook already exists, I can find it using ABAddressBookCopyArrayOfAllSources to get all the sources in the Address Book, then look for the ABRecordRef with a sourceTypeRef of "kABSourceTypeLocal"- if I then pass that recordRef to ABPersonCreateInSource, I can add a record to the local directory.
Does anyone have any suggestions as to how I should best go about creating a record in the "local addressBook", if there ISN'T a local addressbook already?
(also, how could I do this pre-iOS4, as the above calls weren't available then?)
Thanks
Peter
You should take a look at this post:
Obtaining Specific ABSource from ABAddressBook in iOS 4+
that demonstrates how to identify and target specific sources (ABSource) within the ABAddressBook. While this code mentions the function, ABGroupCreateInSource(), there is a similar function, ABPersonCreateInSource() for working with persons.
I found a simple workaround.
Since you can't see/add local contacts when you don't have any pre-existing local contact, the following workaround will be safe to use:
Let's pretend you're using Gmail (Exchange)
Go to your Mail settings for Gmail and disable the Contact sync
When prompted whether you want to keep or remove the Gmail
contacts from your phone, choose to REMOVE them (don't worry, they
won't be removed from Gmail)
Go back to your contacts. You can now create one LOCAL contact
Finally, go back to Settings/Mail/Gmail and re-enable the
Contacts sync
Voila, your Gmail contacts are back into your phone and you now
have 1 local contact that enables you to access the Local contacts
group in addition to the Gmail contacts group.
Hope that helps (I just had the same problem and found this workaround that works great for me).
Ben.