Our app will use "SmsManager sendTextMessage" to send SMS which is edited by user. But some anti-virus apps will determine our app is a virus.
How could I avoid this except asking anti-virus apps to add our app to white list?
Thanks.
Our app will use "SmsManager sendTextMessage" to send SMS which is edited by user. But some anti-virus apps will determine our app is a virus.
How could I avoid this except asking anti-virus apps to add our app to white list?
Thanks.
Are you passing arguments to Androids built-in SMS application or are you allowing users to send SMS within the application?
Alot of scam apps and the like often relied on using in app messaging to make the users phone send secret text messages to a premium rate number without the users awareness. The only time a user is made aware of this is when they install the app on their device, of course this might not be sufficient protection if the fraudulent app is cleverly disguised as a genuine one and the user allows the app to send messages.
To prevent the user from falling into this trap (and hopefully allow you to avoid anti-virus apps) you could send the message you would like to send to the SMS application like so (this is some code I wrote a few months back)
Intent textdoc = new Intent (android.content.Intent.ACTION_VIEW);
textdoc.putExtra("address", Userprefs.getString("DOCTOR_MOBILE", "null"));
textdoc.putExtra("sms_body", "Hello " + Userprefs.getString("DOCTOR_NAME", "Dr") +
" This is " + Userprefs.getString("FIRST_NAME", "null")
+ " " + Userprefs.getString("SURNAME", "null") + " reporting "
+ "my latest health check. My temperature is "
+ Float.parseFloat(Tempcheck.getText().toString())
+ ". My Blood Pressure is "
+ Integer.parseInt(Pressurecheck.getText().toString())
+ ". My Pulse Rate is "
+ Integer.parseInt(Heartratecheck.getText().toString()));
textdoc.setType("vnd.android-dir/mms-sms");
dialog.dismiss();
startActivity(textdoc);
By defining the textdoc.setType method parameter as "vnd.android-dir/mms-sms", this allows your app to paste the contents of your message to the application where the user has the choice to send it. This avoids any threat of fraudulent and unintended text messages being sent by the device without the users consent, and hopefully is sufficient enough to not trigger anti-virus apps.
Hope this helps.