send sms android app delphi xe7 question [Edit]

i have written following code for send sms on delphi xe7 but i have following error
{
java.lang.securityexception: sending sms message : uid10176 does not have android.permission.send_sms

}


{
unit Unit1;
 
 
interface
 
 
uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
  FMX.Helpers.Android,
  Androidapi.JNI.GraphicsContentViewText,
  Androidapi.JNI.Net,
  Androidapi.JNI.JavaTypes,
  Androidapi.JNI.Telephony, Androidapi.Helpers;
 
 
type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
 
 
var
  Form1: TForm1;
 
 
implementation
 
 
{$R *.fmx}
 
 
procedure TForm1.Button1Click(Sender: TObject);
var
  smsManager: JSmsManager;
  smsTo: JString;
  target,messagestr:string;
begin
 messagestr:='helloooo';
 target:='09126478426';
 
 
  smsManager:= TJSmsManager.JavaClass.getDefault;
  smsTo:= StringToJString(target);
  smsManager.sendTextMessage(smsTo, nil, StringToJString(messagestr), nil, nil);
end;
end.



}

please guide me

Edited by: ehsan mohtadi on Dec 5, 2014 2:25 AM
0
ehsan
12/5/2014 10:26:16 AM
embarcadero.delphi.firemonkey 4901 articles. 4 followers. Follow

2 Replies
3018 Views

Similar Articles

[PageSpeed] 46

ehsan wrote:

> i have written following code for send sms on delphi xe7
> but i have following error

The error is self-explanatory.  Your app does not have the SEND_SMS permssion 
enabled.  You need to enable it:

Uses Permissions
http://docwiki.embarcadero.com/RADStudio/XE7/en/Uses_Permissions

--
Remy Lebeau (TeamB)
0
Remy
12/5/2014 6:52:03 PM
> {quote:title=ehsan mohtadi wrote:}{quote}
> i have written following code for send sms on delphi xe7 but i have following error
> {
> java.lang.securityexception: sending sms message : uid10176 does not have android.permission.send_sms

you must add line 

<uses-permission android:name="android.permission.SEND_SMS" />

to android manifest file ( AndroidManifest.xml )
0
peiman
12/9/2014 10:39:15 PM
Reply:

Similar Artilces:

send sms android app delphi xe7
i have written following code for send sms on delphi xe7 but i have following error { java.lang.securityexception: sending sms message : uid10176 does not have android.permission.send_sms } { unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Helpers.Android, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Net, Androidapi.JNI.JavaTypes, Androidapi.JNI.Telephony, Androidapi.Helpers; type TForm1 = c...

What advantages have to build one delphi xe7 app vs hybrid app as html5 bu? [Edit]
I need to know which mobile advanced hardware characteristics differences has delphi xe7 vs html5 builder for example. I need this characteristics: TEXT EDITING Text in different directions Changing Color On a picture Copy and paste Change Font delete uppercase lowercase Save phrases Select a saved phrase Bank of personal texts PHOTOS OR IMAGES Pulling photos or images already created cut paste Change in size turn Bank of personal images Drawings predefined Figures Lines or free strokes Change color and thickness Fillings Copy and paste delete Personal bank ...

How to build enterprise-grade Delphi app
Hi It would be nice to build enterprise-grade appl with Delphi, but are the options or third party software (like in J2EE) to do this? e.g. 1) there is J2EE middleware for hosting components - developer is not required to handle all the issues that are connected with session handling and different contexts in which the components can be stored (like application, session, request context, etc.). I understand that some of this can be done in DataSnap or in Web Services (can be even PHP, Java or .NET) and Delphi client - but in both cases there are some drawbacks: - for DataSnap - much shou...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

FireDAC mobile app error as sqlite as delphi XE7 [Edit]
i im trying of connect my app as FireDAC but i have some errors. I follor all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edito i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db i create this database and table as other tool, and i can to add this to DBExpres in data exploer and i can to use it in one mobile delphi project", and i set lockingmode to normal as this manual tell. After as tell in page 269 of this manual when i click over test button, i ...

Delphi XE5 Android App dies preparing INDY email [Edit]
Can someone help me with the following code, it connects and authenticates the idsmtp connection but the app dies on the line:- idMessage1.Recipients.EMailAddresses:='colin@gmail.com'; Anyone had and overcome this problem? procedure TForm3.Button1Click(Sender: TObject); begin if idSMtp1.Connected = true then idsmtp1.Disconnect; idsmtp1.Connect; //THIS LINE WORKS idSmtp1.Authenticate; //THIS LINE WORKS idMessage1.Clear; //THIS LINE WORKS ...

Running a Delphi XE7 Android app on an Intel device using Houdini
To run the FireMonkey app Intel (Atom) version Android terminal - RAD Studio XE7 http://community.embarcadero.com/blogs/entry/intel-atom-android-firemonkey-rad-studio-xe7-1-en -- Remy Lebeau (Indy Team) ...

how to read android contacts,callogs,sms,etc on Delphi XE5 [Edit]
hi, i want to read android phone contacts(adress book) list name and phone number, i search a sample of Delphi XE5 for this but not find. Could you please give a small sample on it. (contacts, callogs, sms, etc.) Thanks. Edited by: caner aytac on Sep 20, 2013 3:37 AM Edited by: caner aytac on Sep 20, 2013 3:39 AM ...

FireDAC mobile app error as sqlite as delphi XE7 [Edit] #2
i im trying of connect my app as FireDAC but i have some errors. I follow all steps of Mobile_Tutotils_en_pdf file for delphi XE7. First i add one FireDAConnection compoent, after i in FireDAConnection Edit i set DriverID as Sqlite, in Database parameter i set this existing sqlite database "shoplist.s3db , and i set lockingmode to normal as this manual tell. I After i follow steps 1,2,3,4 and in the step 5 of the page 265 when i try of to set Connected property to true, i get this error: 1. [FireDac][Comp][Clnt]-340. Driver ID is not defined. Set TFDConnection.DriverName or Add D...

Firemonkey app from Delphi XE2 -> Dropbox & iCloud [Edit]
Im developing an app for iOS and MacOS Is there any component or a way to connect to Dropbox and iCloud using Delphi XE2? > {quote:title=laureano bonilla wrote:}{quote} > Im developing an app for iOS and MacOS > > Is there any component or a way to connect to Dropbox and iCloud using Delphi XE2 For iCloud, you will need support for both iOS 5.0 and 10.7 Lion. I don't believe XE2 even supports the classes added with iOS 4.x, much less 5.0, although you can parse the iOS 5.0 UIKit and Foundation headers yourself: http://web.me.com/macpgmr/ObjP/Xcode4/iOS_5_Parsing_...

New video of camera surveillance app made with Delphi XE5 and FireMonkey [Edit]
Hello guys I know that most of you have already seen the video from our mobile camera surveillance system, but today I uploaded a new video showing the final version, which has a much better interface than the previous version, along with some nice features that you all will like to see. I would recommend the PTZ and Virtual Matrix sections which shows some nice GUI controls made with Firemonkey http://www.youtube.com/watch?v=4lQGA8-sO9w The app is also available for download for Android, instructions are available on the video description > {quote:title=Eric Fleming Bonilha w...

[SOLVED] Delphi XE5
Hello, I have a very simple program that works perfectly. But if I add a TIdTcpClient component on my form, with no change in the properties or event, just add it, then application crash when exiting with the hardware return button. What is wrong ? thank you Franck {code} unit FormTestModbusXE; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.TabControl, FMX.StdCtrls, FMX.Edit, FMX.Layouts, FMX.ListBox, IdBaseComponent, IdComponent, IdTCPConnection, Id...

Delphi and Delphi Prism licensing question
When I buy Delphi and Delphi Prism, do I get a "named user licence" or a "workstation licence"? Can I install both products on two machines I use with the same licence keys? I have a Mac Pro ("Cyrus") running Vista 64 in VMware and a MacBook ("Blacky") running Vista 32 in Parallels. Can I install Delphi and Delphi Prism on both Cyrus and Blacky since I use both machines (and like to have all dev tools I use installed on both machines at all times)? Andrew Brehm wrote: > When I buy Delphi and Delphi Prism, do I get a "named user licence...

[Android] TImage3D can not display on Android (Delphi XE7)
TImage3D can not display any image on Android,Only display black color in TImage3D. But it can be displayed in the windows platform. Android Phone: Nexus5 Version: Delphi XE7 Test step: Create a new Blank project of Multi-Device Application and add a 3D Form , Add a TImage3D control and set property "Bitmap" with any Image/Picuture (etc: PNG or JPG picture),run on Android phone, then you can found the android form display the Image3D with full black color ,not display any picture. But it can be displayed in the windows platform. There is a bug in XE7 so that no material or im...

Web resources about - send sms android app delphi xe7 question [Edit] - embarcadero.delphi.firemonkey

West Lothian question - Wikipedia, the free encyclopedia
He illustrated his point by pointing out the absurdity of a Member of Parliament for West Lothian being able to vote on matters affecting the ...

The security questions that every company should be asking in 2015
With more businesses operating online than ever before, security has moved from physical to virtual. Ensuring the safety of the details of your ...

Submit your questions for Autoblog Podcast #460
Filed under: Podcasts We're recording Autoblog Podcast #460 this week, and our main focus will be answering our listeners' questions. Submit ...

Want to land a job at Netflix? You’ll have to answer these tough questions first
Netflix sounds like an incredibly cool place to work if you're a software engineer but they don't let just anybody come in to code for them. ...

If you want to work for Airbnb, get ready to answer these 27 ridiculous interview questions
Airbnb is the third-most valuable private tech company in the world — it has a $25.5 billion valuation . If you want to work there, you might ...

Questions raised about San Bernardino shooter's visa
Chair of House Judiciary Committee says immigration officials had insufficient evidence to issue Tashfeen Malik a visa to enter the U.S.

“R. Kelly walked out of a HuffPo interview after some awkward questions” links
R. Kelly walked out of HuffPo interview after being asked some awkward questions about his fans’ reactions to his sexual assault of minors. [Dlisted] ...

Where's Conservative Outrage Over Hugh Hewitt's Questions To Ben Carson?
One of the biggest tools the conservative punditry uses to make itself look like underdogs is to complain that the librul media is out to get ...

Shocker: Hillary Clinton Spins Question On Bullying In Order To Criticize Donald Trump
Shocker: Hillary Clinton Spins Question On Bullying In Order To Criticize Donald Trump

No Sumner Redstone Deposition Yet But Philippe Dauman Has To Answer Questions Says Judge In Health Care ...
Manuela Herzer will not be getting Sumner Redstone to face lawyers' questions over his mental capacity to make decisions about his health care ...

Resources last updated: 12/24/2015 9:10:28 AM