1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

INTEGRATING APPLICATION DELPHI XE7 ANDROID WITH WHATSAPP

Discussion in 'Delphi Android And IOS' started by medreis, Nov 6, 2015.

  1. medreis
    Offline

    medreis DF Junior

    Understanding and encoding

    Basically we EDIT1 in a text that will be delivered to Whatsapp for when selecting contact him the message is sent. Now that we have the concept we code.
    Remember that we must once again make use of namespaces orUnits for use of Android features in Delphi, for such in theimplementation section enter the:
    Implementation

     {$ R * .fmx}
     uses
       FMX.Helpers.Android, Androidapi.Jni.GraphicsContentViewText,
       Androidapi.Jni.Net, Androidapi.Jni.JavaTypes, idUri, Androidapi.Jni,
       Androidapi.JNIBridge, Androidapi.Helpers; 
    After that, in the OnClick Button1 we enter the code below:
    procedure TForm1.Button1Click (Sender: TObject);
     var
       IntentWhats: JIntent;
       message: string;
     begin
       Then if Edit1.Text.IsEmpty
         message: = 'Whatsapp sending test with Delphi XE7.  '+ # 13 +
             'Read more in www.dsisistemas.com'
       else
         Message: = Edit1.Text;


       IntentWhats: = TJIntent.JavaClass.init (TJIntent.JavaClass.ACTION_SEND);
       IntentWhats.setType (StringToJString ('text / plain'));
       IntentWhats.putExtra (TJIntent.JavaClass.EXTRA_TEXT,
           StringToJString (message));
       IntentWhats.setPackage (StringToJString ('com.whatsapp'));
       SharedActivity.startActivity (IntentWhats);

     end; 
     
    tayipk1980, Mahdi and Wendel like this.
  2. ilanamlas1
    Offline

    ilanamlas1 Guest

    good friend
     
  3. vmoncayo
    Offline

    vmoncayo DF Junior

    thanks
     
  4. tayipk1980
    Offline

    tayipk1980 DF Member

Share This Page