IBM Domino Send reminder to another user - java

From user A's mailbox application, can an agent send reminder to another user B?
I coded a (Java) agent, which runs within user A's mailbox to create reminder for user A him/herself. This works.
If I replace
reminderDocument.save();
reminderDocument.putInFolder("$Alarms");
with
reminderDocument.replaceItemValue("SendTo", recipient);
reminderDocument.send();
then
the reminder is sent to User B. However, the alarm notification doesn't appear because this document is not part of User B's $Alarms folder. Is there a solution to this? Thanks.

"Sending" a reminder will always have the recipient do something with the reminder for it to become an alarm.
Please check the Calendaring and Scheduling Schema
for how to do it "right".
If you need to place an alarm in another users inbox, without him to interact, then you need to create the document there directly and put it in his "alarm"- folder, or you have to setup "automatic processing" in the recipients mailbox (what he probably does not want).
In short: There is no easy way to do this without following the "workflow" (see Page 3 of linked document

Related

How to specify that user has shared my app x number of times or not?

I am working on android app that asking users to share this app to ten users to get a bonus. App can be shared via any app appearing in dialog. Now the problem is, I cannot determine that user has successfully shared my app to x number of users.
The simple code that I am using to share app is following.
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "playstore link");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, getResources().getString(R.string.share_app_text));
startActivity(Intent.createChooser(sharingIntent, "Share app via"));
I think the best you could get is: find a way to understand whether that "sharing" was actually succesfull (which could basically mean: in the end, the user clicked some OK button).
Then, persist that information.
In other words: you basically need a counter that gets stored, for example using Android's shared preferences (see here for a simple example).
The real problem might be that the "sharing" could be tricked easily. You know, like simply sharing to the same person on Facebook 10 times.
So, if you want something that is less easy to trick, you probably should count something else, like: you create a specific URL on a server of yours, and you count how many times that is visited (from different IPs for example).
Use UTM source.
1) Embade a UTM key unique to a particular user to the redirection URL.
2) when the user clicks on the share button, open that URL.
3) Host an HTML page at the server which opens from the aforesaid URL which will read that UTM code, create a mapping for that install and will redirect the user to the play-store URL.
If you actually want to track if users installed an app after they received a shared link, you should give Firebase Invites a try. This is probably the most elegant way if you don't want to develop this functionality on your own.

Selenium webdriver and database testing

I was looking for the answer on the Internet and I haven't found one so... the thing is: I'm writing automated tests (in java) using selenium and the website that I'm testing has an option of phone number confirmation.
The user types his phone number, clicks save and to that phone number, we get confirmation code (with an SMS). My question is: how can I test it? Is there any option where I can create a database only for tests or something?
There is no way of knowing if your phone has just received a text from a specific number, without your phone being involved in the process.
To cascade test cases like this:
assertThat(phoneNoEntered);
assertThat(smsReceived);
You need to work with the gateway being used to send SMS. Because honestly, your test scope should be limited from "phoneNo entered" to "Gateway Fired an sms to that number". You don't wanna waste time on deciding if the Phone Subscription service honored your gateway's request, often it depends on user's subscription service.
So find out about the getway, find out if it provides a REST api, and then automate test like this: assertThat(gatewaySmsId == SOME_IDENTIFIER);

How to set timer, even if App is closed?

I habe a app for event informations an app which sends pushmessages. Now I want to give the user the option to disable the messages for a specific time (one hour, one day ...). I know how to dissable it compleatly, but how I can set it like I want (one hour...) even if the app is closed?
Well, the simple solution would be to check if there is a time restriction is present in the same place where you notify user for event information. If there is a time restriction dont show the notification else show it

Java EE - creating a register-by-email setup

Assuming I have a web app (Java EE 6), I want to realize the following use case:
On a generic "register" page, user enters his/her email and submits
System sends email to user. In this mail, there should be a link to a full registration page
User follows link, fills out required credentials, and submits
System stores user in database, and sends confirmation email
All temporary data is discarded.
The part I am having problems with is mostly step 2. What I need to know is the following:
What is the best way of setting up a personal registration page for the user? Should I generate a temporary page and link to it? Should I give the user a special cookie? In either case, how can I implement this? No code is needed, I just need some pointers on where to start looking and coding.
EDIT:
A very important question here, no matter how I do it, is the following: How can I generate and deploy a temporary webpage? I am rather new to Java EE, so forgive me if this has an obvious answer.
If the registration page is standard for every user then there is no need in creating a temporary page and linking to it or creating a special cookie etc... Just create the page with the registration form on it and send your clients a link to that.
If you want a special customized registration page for a specific user, then you can just send an e-mail with a link to your client with their information as a query parameter (ie http://yoursite.com/registration?fname=jordan&lname=denison) or you could use something like PrettyFaces to make the URL more readable as well as making it easier to extract those parameters and fire a method with them.
If I had to do it, then I would have
Created a generic registration page
Created a unique ID for the user
Send the link to user which contains the unique ID as a parameter
The registration page throws error if the unique ID is not presented to it, or the ID is not valid (already used, or not issued)

Android: How to poll email?

I'm making a widget who, among other things, displays the quantity of unread emails the user has in a given inbox.
Specifically, I'm asking how to:
-Obtain the list of email accounts on the device
-Make a call to one of the accounts such as
int newMailCount = accountInstance.getMailCount()
Any ideas?
Thanks
Obtain the list of email accounts on the device
This is not possible. You can use AccountManager to try to get at account information, but there is no "email" type that I am aware of, and email programs do not have to use AccountManager.
Make a call to one of the accounts
There is nothing in the Android SDK for email. There are dozens, perhaps hundreds, of email programs out there. None are part of the operating system. Email programs are welcome to create their own app widgets.

Categories

Resources