Android instances-take and share photos, share text (xe8)

Source: Internet
Author: User

Results:

1. The sharing of text is not so, the reason is unclear. The great God knows, please m, thank you very much here.

2. If you want to support picture editing, change the editable of the action event to true.

Related information:

Website address: Http://docwiki.embarcadero.com/RADStudio/XE7/en/Mobile_Tutorial:_Taking_and_Sharing_a_Picture,_and_ Sharing_text_ (ios_and_android)

Instance code:

1 UnitUnit1;2 3 Interface4 5 uses6 system.sysutils, System.types, System.uitypes, system.classes, System.variants,7 FMX. Types, FMX. Controls, FMX. Forms, FMX. Graphics, FMX. Dialogs, Fmx.stdctrls,8 FMX. Controls.presentation, System.actions, FMX. Actnlist, FMX. Objects,9 FMX. Stdactns, FMX. Medialibrary.actions, FMX. Scrollbox, FMX. Memo;Ten  One type ATForm1 =class(Tform) - Toolbar1:ttoolbar; - Button1:tbutton; the Button2:tbutton; - Button3:tbutton; - Image1:timage; - actionlist1:tactionlist; + takephotofromcameraaction1:ttakephotofromcameraaction; - takephotofromlibraryaction1:ttakephotofromlibraryaction; + showsharesheetaction1:tshowsharesheetaction; A Button4:tbutton; at Memo1:tmemo; - showsharesheetaction2:tshowsharesheetaction; -     proceduretakephotofromcameraaction1didfinishtaking (image:tbitmap); -     proceduretakephotofromlibraryaction1didfinishtaking (image:tbitmap); -     procedureShowsharesheetaction1beforeexecute (sender:tobject); -     procedureShowsharesheetaction2beforeexecute (sender:tobject); in   Private -     {Private Declarations} to    Public +     {Public Declarations} -   End; the  * var $ Form1:tform1;Panax Notoginseng  - Implementation the  + {$R *.FMX} A {$R *. NMXHDPIPH.FMX ANDROID} the  + //Share Pictures - procedureTform1.showsharesheetaction1beforeexecute (sender:tobject); $ begin $ ShowShareSheetAction1.Bitmap.Assign (image1.bitmap); - End; -  the //Share Text - procedureTform1.showsharesheetaction2beforeexecute (sender:tobject);Wuyi begin theshowsharesheetaction1.textmessage:=Memo1.Lines.Text; - End; Wu  - //Call Camera About proceduretform1.takephotofromcameraaction1didfinishtaking (image:tbitmap); $ begin - Image1.Bitmap.Assign (Image); - End; -  A //using the picture library + proceduretform1.takephotofromlibraryaction1didfinishtaking (image:tbitmap); the begin - Image1.Bitmap.Assign (Image); $ End; the  the End.

Android instances-take and share photos, share text (xe8+ Xiaomi 2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.