Launch a new activity on click of an linkify Phone number - android-layout

I have a screen on which a weburl and a phone number is linked.
When i clicks the "phone number link" it goes to dialpad and shows the number on dial pad,then if i want to make call i have to press dial button.
What i need to do is to directly make an call when i clicks the phone number itself.I dont want dial pad screen to show to the user.
and keep in mind i have a full textView in which there is some message as well as the link to phone number.
So i think onClick() of textView will not be applicable here.
Please guide me through it if u can.
Thanx in advance :)

You need to add this permission line to your AndroidManifest.xml file if you want to auto dial
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
Regards,
Mark

Related

How to add clickable code in text message(SMS)?

I am sending a One time passworde or verification code from my node js application. I am actually sending this text
const message = `Nekmart.Do not share PIN and security code with others.
Nekmart never asks for those. Your Nekmart security code is ${otp} .
Validity 5 minutes.`
But When I received this text as SMS. I found the OTP code is not clickable. Like the following image-
But I see many SMS with this type of verification code with clickable functionality. Like somthigng-
Here We can see this is clickable. When someone click to that area, they can see some options.
My question is When I send the message text Then Why that otp code is not clickable. How can I do that?
SMS messages are only text, you cannot mark them up in any way to make the SMS application render them differently. It is entirely down to the SMS application on the device for how it decides to render the message and whether it makes an OTP code clickable.
There is nothing that you can do here.
It's true that SMS messages are just straight text and cannot be formatted, but systems interpret the codes on their own. For example, when you write "Your invite code is: 01010101", iOS will make it clickable.

Rich media on intent action

I can't realise, how to send to user rich messages instead of plain text.
Somebody can help me with it?
At your intent, scroll all the way down to responses. Next to the default, there's a plus button where you can select for which platform you want to add rich messages. If you then go to the 'Add responses' you can select from the drop down menu what your rich response should have (madia, suggestion chips etc) and then add there all the information required.

vaadin - delay execution while modal dialog window is open

I have a grid layout in which I want to show a pop up when the user tries to replace a component which is already present in the grid.
For e.g. the grid layout has a Label (wrapped in a DragAndDropWrapper) which is present at 0,0 position.
If the user tries to add a new component at the same position(0,0 position), then it should show a pop up (confirmation dialog box) asking the user to confirm if the user wishes the replace the existing component or not.
Now, my issue is that the current thread does not wait for the execution to complete. It keeps going ahead after showing the pop up box. Thus, there is a lot of problem in updating the UI after the input is taken from the dialog box for the user's answer.
Can someone show how to do this? Note that I need to do this in a DragAndDropHandler's drop method call as I need to show the dialog box only when the user tries to drop a new component on an existing component of the grid layout.
A working example would be a great help.
Thanks in advance.
So I followed the comment by André Schild and it did work for me.
I just remember which component and location was used for replacing the component. Then, I ask for a confirmation and if the user says Yes, then I just go ahead and replace it.
Thanks again Andre

How to identify a button click in coded UI Customised code

In UIMAP.CS file in both the Recorded method and assertion method, I am not able to identify the button click.
Is there any way I can get hold of the button click event?
I am able to get hold the button in to a UITESTCONTROL variable but the options I was able to see are "exists", "enabled","name" etc...
I tried checking it with assertions too when I dragged the cross hair on to the clicked button , assertions are generated only for checking the existence,correctness of text and name but not the events occured on it..
Please help in this regard..
Please make sure that the Control/Object on which you want to use the Click operation is a button and not any Web Element or control which does not support the Click operation.
Once verified, you can do the following:
Record a New Session and while recording click on that button, stop your recording.
Open the UIMap.cs and navigate to that button control. The intellitrace would show you all the available options for that control.
Thanks
Nikhil

Local Notification iPhone sdk

How can I change the text of buttons on alert of a local notification. By Default it is "Close" and "View". I have to replace it with "YES" and "NO".
Thanks in advance.
You can customize the 'View' button by providing a string in the UILocalNotification's alertAction property. I don't think you get a choice for the Close button.

Resources