I'm working on an security application in which my application will send a mail to the server automatically without the phone user disturbance. What I need is
Colletct user phone number and imei number
Send a email with the information, but user don't know about the process.
When a user insert a new sim again a new email will be send with the above mentioned process
What I done till is :
Colletct user phone number and imei number using telephony manager
Save the information locally
But I need an instruction or tutorial for doing rest of my work. Can anyone help?
You can do this in Version below M but above M you need to ask permission from the user so i suggest you to make a database and send data to server using background async task.
Here is tutorial to send email without intent http://www.oodlestechnologies.com/blogs/Send-Mail-in-Android-without-Using-Intent
Related
so I have an edit text that will be used as a view to get phone number from user, say if the phone number is +6123456789 , I want to check if this number has whatsapp number or not,i want to avoid the user to input fake whatsapp number, how to do that ?
Update (Nov 2022):
Whatsapp are repurposing the contacts node starting in v2.43 to no longer provide status information about a phone number. Regardless of whether a user has WhatsApp, it will always return valid for status in the response. For more information see official docs
original answer:
You must have: Facebook Whatsapp Business Api for contacts check
Once you have a valid business account you could then query the Contact. You will get all the details in the documentation.
Hope it works for you!
You can try this service https://watverifyapi.live
It allows you to verify multiple whatsapp number at a time.
I'm developing an android app which contains registration form also,
Here I want to make user can register only once in the device. and if register again (by clearing data or reinstall) with different mobile number and email id, app should give error message.
I think you need to check IMEI number of device
IMEI number will not be changed if sim card changed.
This alone cannot be achieved on mobile device itself. You also need to maintain server which keep the identity of device and user mobile number together. device identity can be combination of IMEI and device id
When you try to register, you do all local validation on client but ultimately 1 network call is must to register, for this send device_id and newly registered number.
Next time when some user tries to register with new number from same device, u'd already have this information on server, server can respond back telling, hey looks like this mobile device is already associated with an number do you wish to use the previous number instead.
In case, user denies, he must be allowed to delete the old relation between oldnumber-current device.
There after he can proceed with the way initially he started to register.
Also this is completely business requirement, whether u want to have 1device-> #numbers or #numbers -> 1device. But i would rather suggest to keep it safe simple and secure with 1device->1number.
For Android Version 6 And Above, WLAN MAC Address has been deprecated.
For uniquely Identification of devices, You can Use Secure.ANDROID_ID.
And we don't need any additional permission to retrieve Android ID.
you can get Android Id like:
public String getDeviceUniqueID(Activity activity){
String device_unique_id = Secure.getString(activity.getContentResolver(),
Secure.ANDROID_ID);
return device_unique_id;
}
You can do this by below approach.
On sign up, get user device IMEI number as well and store on server database as well.(In this step make sure that user that IMEI number does not exist)
I want to restrict my application to install only allowed device. That is while installing the app I want to fetch the device information like imei number. Then I want to check the imei number if it is valid or not using my restored database of imei.
Is that possible?
Its not possible to prevent App installation, if one has the APK file but
Through smart coding you can achieve it
1) Anyways you will get the IMEI numbers of the users phone so programatically you can check the condition on landing/splash page if IMEI==USER_IMEI_NUMBER then only he/she can able to see its main page else he will not get authority to enter into main page but for that you need to create APK file for each device
2) If you dont know how many users will use your app then you can do remote database in that database you can save new users IMEI number and in splash/landing page you can check through webservice that IMEI==USERS_IMEI_NUMBER (from remote database) then he/she can use your app but off course for that you need to mention internet permission in it and user must have valid internet connection if you dont want user to check it identity/IMEI number each time then you can validate user at once and you can save its result in shared preferrences and you can give access to user everytime without hiting webservice for validation
hope this suggestion may help you happy coding :)
I need "Contact Us" functionality which is generally used in website.How to send emails to mail id's provided by user. I know that using Intent we can send email. Using intent we can open default mail app in phone and able to send mail, But how to send mail without opening mail app.
You could do it server-side: You make an HTTP-POST Request with all the data which you want to send in it.
Use WebView.
your "mailto:" tag will not be picked by any app as they will not have access to your webview.
I think the user needs to open the mail app, as you can't assure from which email he wants to send you a contact message. If the user has an already configured account or not, is something you may not know. Maybe he just wants to send you info without using his email.
If you still want to create a contact us going through email, I'd go for this solution.
Otherwise, something like what #niklas said would be ok, but maybe encrypting the content, and probably not sending it as an email, but storing it into a database (so they can just fill the database with trash, instead of exploiting your service to send spam)
Use JavaMail API ... See this below link.
Sending emails without user intervention
I am trying to develop an app, where one of the requirement is to send email or SMS to the contact which the user picks. When the user needs to send message, they can pick the contact from the contact list. If the user selects the "phone number" of the contact, I need to start SMS application and insert my message contact. If the user selects the contact email address from the contact list, I need to open the EMail application with my content in Subject and body.
How do the application know about the user input??
I am not an expert on this topic but it is interesting to me so I have done some reading about it.
You have the action of selecting a phone number or email address right? So if the user selects a phone number you can use SmsManager for that (here is an article about it http://mobiforge.com/developing/story/sms-messaging-android ). And a related Stack Overflow article discusses sending emails on the Android platform and one user gives a very nice Java example of doing this. Here is the article: Sending Email in Android using JavaMail API without using the default/built-in app
I hope these might be of some help!