Fandom

Delphi Programming

Android Device test environment configuration

2,918pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

This page provide three simple files to help you to test your device through embarcadero samples project.

InstructionsEdit

Using Delphi XE5, open the samples project group (see below), set the build configuration to RELEASE for all the projects and build (Project->Build All Projects).

For each project, open the Deployment Manager (Project Deployment) and click at the Deploy button (is there a way to batch this job?), this process generates the apk file.

Now you can use the InstallSamples.bat (see below) to batch send (install) all samples to device, after the tests you can use the UninstallSamples.bat to batch remove all samples from device.

Project GroupEdit

This is the project group with all the sixteen samples used to test the devices. It need to be in the samples folder located at "DRIVE LETTER:\Users\Public\Documents\RAD Studio\12.0\Samples" (for Windows7/8)

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <ProjectGuid>{2508A43D-7BC0-4E28-A4FB-40DDA0B33E60}</ProjectGuid>
    </PropertyGroup>
    <ItemGroup>
        <Projects Include="MobileCodeSnippets\AudioRecPlay\AudioRecPlay.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="MobileCodeSnippets\DatePicker\DatePicker.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="FireMonkeyMobile\FlashLight\FlashLight.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="FireMonkeyMobile\MusicPlayer\FMMusicPlayer.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="MobileCodeSnippets\IBLite\IBLite.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="MobileCodeSnippets\InteractiveGestures\ImageRotation\ImageRotation.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="FireMonkeyMobile\LocationDemo\LocationDemoProject.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="FireMonkeyMobile\LowLevel3D\LowLevel3D.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="FireMonkeyMobile\Controls\MobileControls.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="MobileCodeSnippets\PhoneDialer\PhoneDialer.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="FireMonkeyMobile\PhotoEditorDemo\PhotoEditorDemo.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="MobileCodeSnippets\Notifications\SendCancelNotification\SendCancelNotifications.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="FireMonkeyMobile\SensorInfo\SensorInfo.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="MobileCodeSnippets\ShareSheet\ShareSheet.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="MobileCodeSnippets\WebBrowser\WebBrowser.dproj">
            <Dependencies/>
        </Projects>
        <Projects Include="FireMonkeyMobile\KeyboardTypes\VirtualKeyboardDemo.dproj">
            <Dependencies/>
        </Projects>
    </ItemGroup>
    <ProjectExtensions>
        <Borland.Personality>Default.Personality.12</Borland.Personality>
        <Borland.ProjectType/>
        <BorlandProject>
            <Default.Personality/>
        </BorlandProject>
    </ProjectExtensions>
    <Target Name="AudioRecPlay">
        <MSBuild Projects="MobileCodeSnippets\AudioRecPlay\AudioRecPlay.dproj"/>
    </Target>
    <Target Name="AudioRecPlay:Clean">
        <MSBuild Projects="MobileCodeSnippets\AudioRecPlay\AudioRecPlay.dproj" Targets="Clean"/>
    </Target>
    <Target Name="AudioRecPlay:Make">
        <MSBuild Projects="MobileCodeSnippets\AudioRecPlay\AudioRecPlay.dproj" Targets="Make"/>
    </Target>
    <Target Name="DatePicker">
        <MSBuild Projects="MobileCodeSnippets\DatePicker\DatePicker.dproj"/>
    </Target>
    <Target Name="DatePicker:Clean">
        <MSBuild Projects="MobileCodeSnippets\DatePicker\DatePicker.dproj" Targets="Clean"/>
    </Target>
    <Target Name="DatePicker:Make">
        <MSBuild Projects="MobileCodeSnippets\DatePicker\DatePicker.dproj" Targets="Make"/>
    </Target>
    <Target Name="FlashLight">
        <MSBuild Projects="FireMonkeyMobile\FlashLight\FlashLight.dproj"/>
    </Target>
    <Target Name="FlashLight:Clean">
        <MSBuild Projects="FireMonkeyMobile\FlashLight\FlashLight.dproj" Targets="Clean"/>
    </Target>
    <Target Name="FlashLight:Make">
        <MSBuild Projects="FireMonkeyMobile\FlashLight\FlashLight.dproj" Targets="Make"/>
    </Target>
    <Target Name="FMMusicPlayer">
        <MSBuild Projects="FireMonkeyMobile\MusicPlayer\FMMusicPlayer.dproj"/>
    </Target>
    <Target Name="FMMusicPlayer:Clean">
        <MSBuild Projects="FireMonkeyMobile\MusicPlayer\FMMusicPlayer.dproj" Targets="Clean"/>
    </Target>
    <Target Name="FMMusicPlayer:Make">
        <MSBuild Projects="FireMonkeyMobile\MusicPlayer\FMMusicPlayer.dproj" Targets="Make"/>
    </Target>
    <Target Name="IBLite">
        <MSBuild Projects="MobileCodeSnippets\IBLite\IBLite.dproj"/>
    </Target>
    <Target Name="IBLite:Clean">
        <MSBuild Projects="MobileCodeSnippets\IBLite\IBLite.dproj" Targets="Clean"/>
    </Target>
    <Target Name="IBLite:Make">
        <MSBuild Projects="MobileCodeSnippets\IBLite\IBLite.dproj" Targets="Make"/>
    </Target>
    <Target Name="ImageRotation">
        <MSBuild Projects="MobileCodeSnippets\InteractiveGestures\ImageRotation\ImageRotation.dproj"/>
    </Target>
    <Target Name="ImageRotation:Clean">
        <MSBuild Projects="MobileCodeSnippets\InteractiveGestures\ImageRotation\ImageRotation.dproj" Targets="Clean"/>
    </Target>
    <Target Name="ImageRotation:Make">
        <MSBuild Projects="MobileCodeSnippets\InteractiveGestures\ImageRotation\ImageRotation.dproj" Targets="Make"/>
    </Target>
    <Target Name="LocationDemoProject">
        <MSBuild Projects="FireMonkeyMobile\LocationDemo\LocationDemoProject.dproj"/>
    </Target>
    <Target Name="LocationDemoProject:Clean">
        <MSBuild Projects="FireMonkeyMobile\LocationDemo\LocationDemoProject.dproj" Targets="Clean"/>
    </Target>
    <Target Name="LocationDemoProject:Make">
        <MSBuild Projects="FireMonkeyMobile\LocationDemo\LocationDemoProject.dproj" Targets="Make"/>
    </Target>
    <Target Name="LowLevel3D">
        <MSBuild Projects="FireMonkeyMobile\LowLevel3D\LowLevel3D.dproj"/>
    </Target>
    <Target Name="LowLevel3D:Clean">
        <MSBuild Projects="FireMonkeyMobile\LowLevel3D\LowLevel3D.dproj" Targets="Clean"/>
    </Target>
    <Target Name="LowLevel3D:Make">
        <MSBuild Projects="FireMonkeyMobile\LowLevel3D\LowLevel3D.dproj" Targets="Make"/>
    </Target>
    <Target Name="MobileControls">
        <MSBuild Projects="FireMonkeyMobile\Controls\MobileControls.dproj"/>
    </Target>
    <Target Name="MobileControls:Clean">
        <MSBuild Projects="FireMonkeyMobile\Controls\MobileControls.dproj" Targets="Clean"/>
    </Target>
    <Target Name="MobileControls:Make">
        <MSBuild Projects="FireMonkeyMobile\Controls\MobileControls.dproj" Targets="Make"/>
    </Target>
    <Target Name="PhoneDialer">
        <MSBuild Projects="MobileCodeSnippets\PhoneDialer\PhoneDialer.dproj"/>
    </Target>
    <Target Name="PhoneDialer:Clean">
        <MSBuild Projects="MobileCodeSnippets\PhoneDialer\PhoneDialer.dproj" Targets="Clean"/>
    </Target>
    <Target Name="PhoneDialer:Make">
        <MSBuild Projects="MobileCodeSnippets\PhoneDialer\PhoneDialer.dproj" Targets="Make"/>
    </Target>
    <Target Name="PhotoEditorDemo">
        <MSBuild Projects="FireMonkeyMobile\PhotoEditorDemo\PhotoEditorDemo.dproj"/>
    </Target>
    <Target Name="PhotoEditorDemo:Clean">
        <MSBuild Projects="FireMonkeyMobile\PhotoEditorDemo\PhotoEditorDemo.dproj" Targets="Clean"/>
    </Target>
    <Target Name="PhotoEditorDemo:Make">
        <MSBuild Projects="FireMonkeyMobile\PhotoEditorDemo\PhotoEditorDemo.dproj" Targets="Make"/>
    </Target>
    <Target Name="SendCancelNotifications">
        <MSBuild Projects="MobileCodeSnippets\Notifications\SendCancelNotification\SendCancelNotifications.dproj"/>
    </Target>
    <Target Name="SendCancelNotifications:Clean">
        <MSBuild Projects="MobileCodeSnippets\Notifications\SendCancelNotification\SendCancelNotifications.dproj" Targets="Clean"/>
    </Target>
    <Target Name="SendCancelNotifications:Make">
        <MSBuild Projects="MobileCodeSnippets\Notifications\SendCancelNotification\SendCancelNotifications.dproj" Targets="Make"/>
    </Target>
    <Target Name="SensorInfo">
        <MSBuild Projects="FireMonkeyMobile\SensorInfo\SensorInfo.dproj"/>
    </Target>
    <Target Name="SensorInfo:Clean">
        <MSBuild Projects="FireMonkeyMobile\SensorInfo\SensorInfo.dproj" Targets="Clean"/>
    </Target>
    <Target Name="SensorInfo:Make">
        <MSBuild Projects="FireMonkeyMobile\SensorInfo\SensorInfo.dproj" Targets="Make"/>
    </Target>
    <Target Name="ShareSheet">
        <MSBuild Projects="MobileCodeSnippets\ShareSheet\ShareSheet.dproj"/>
    </Target>
    <Target Name="ShareSheet:Clean">
        <MSBuild Projects="MobileCodeSnippets\ShareSheet\ShareSheet.dproj" Targets="Clean"/>
    </Target>
    <Target Name="ShareSheet:Make">
        <MSBuild Projects="MobileCodeSnippets\ShareSheet\ShareSheet.dproj" Targets="Make"/>
    </Target>
    <Target Name="WebBrowser">
        <MSBuild Projects="MobileCodeSnippets\WebBrowser\WebBrowser.dproj"/>
    </Target>
    <Target Name="WebBrowser:Clean">
        <MSBuild Projects="MobileCodeSnippets\WebBrowser\WebBrowser.dproj" Targets="Clean"/>
    </Target>
    <Target Name="WebBrowser:Make">
        <MSBuild Projects="MobileCodeSnippets\WebBrowser\WebBrowser.dproj" Targets="Make"/>
    </Target>
    <Target Name="VirtualKeyboardDemo">
        <MSBuild Projects="FireMonkeyMobile\KeyboardTypes\VirtualKeyboardDemo.dproj"/>
    </Target>
    <Target Name="VirtualKeyboardDemo:Clean">
        <MSBuild Projects="FireMonkeyMobile\KeyboardTypes\VirtualKeyboardDemo.dproj" Targets="Clean"/>
    </Target>
    <Target Name="VirtualKeyboardDemo:Make">
        <MSBuild Projects="FireMonkeyMobile\KeyboardTypes\VirtualKeyboardDemo.dproj" Targets="Make"/>
    </Target>
    <Target Name="Build">
        <CallTarget Targets="AudioRecPlay;DatePicker;FlashLight;FMMusicPlayer;IBLite;ImageRotation;LocationDemoProject;LowLevel3D;MobileControls;PhoneDialer;PhotoEditorDemo;SendCancelNotifications;SensorInfo;ShareSheet;WebBrowser;VirtualKeyboardDemo"/>
    </Target>
    <Target Name="Clean">
        <CallTarget Targets="AudioRecPlay:Clean;DatePicker:Clean;FlashLight:Clean;FMMusicPlayer:Clean;IBLite:Clean;ImageRotation:Clean;LocationDemoProject:Clean;LowLevel3D:Clean;MobileControls:Clean;PhoneDialer:Clean;PhotoEditorDemo:Clean;SendCancelNotifications:Clean;SensorInfo:Clean;ShareSheet:Clean;WebBrowser:Clean;VirtualKeyboardDemo:Clean"/>
    </Target>
    <Target Name="Make">
        <CallTarget Targets="AudioRecPlay:Make;DatePicker:Make;FlashLight:Make;FMMusicPlayer:Make;IBLite:Make;ImageRotation:Make;LocationDemoProject:Make;LowLevel3D:Make;MobileControls:Make;PhoneDialer:Make;PhotoEditorDemo:Make;SendCancelNotifications:Make;SensorInfo:Make;ShareSheet:Make;WebBrowser:Make;VirtualKeyboardDemo:Make"/>
    </Target>
    <Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
</Project>

InstallSamples.batEdit

This bat needs to be at the same folder as project group

adb shell pm uninstall -k com.embarcadero.AudioRecPlay
adb install MobileCodeSnippets\AudioRecPlay\Android\Release\AudioRecPlay\bin\AudioRecPlay.apk

adb shell pm uninstall -k com.embarcadero.DatePicker
adb install MobileCodeSnippets\DatePicker\Android\Release\DatePicker\bin\DatePicker.apk

adb shell pm uninstall -k com.embarcadero.FlashLight
adb install FireMonkeyMobile\FlashLight\Android\Release\FlashLight\bin\FlashLight.apk

adb shell pm uninstall -k com.embarcadero.MobileControls
adb install FireMonkeyMobile\Controls\Android\Release\MobileControls\bin\MobileControls.apk

adb shell pm uninstall -k com.embarcadero.VirtualKeyboardDemo
adb install FireMonkeyMobile\KeyboardTypes\Android\Release\VirtualKeyboardDemo\bin\VirtualKeyboardDemo.apk

adb shell pm uninstall -k com.embarcadero.LocationDemoProject
adb install FireMonkeyMobile\LocationDemo\Android\Release\LocationDemoProject\bin\LocationDemoProject.apk

adb shell pm uninstall -k com.embarcadero.FMMusicPlayer
adb install FireMonkeyMobile\MusicPlayer\Android\Release\FMMusicPlayer\bin\FMMusicPlayer.apk

adb shell pm uninstall -k com.embarcadero.PhotoEditorDemo
adb install FireMonkeyMobile\PhotoEditorDemo\Android\Release\PhotoEditorDemo\bin\PhotoEditorDemo.apk

adb shell pm uninstall -k com.embarcadero.LowLevel3D
adb install FireMonkeyMobile\LowLevel3D\Android\Release\LowLevel3D\bin\LowLevel3D.apk

adb shell pm uninstall -k com.embarcadero.SensorInfo
adb install FireMonkeyMobile\SensorInfo\Android\Release\SensorInfo\bin\SensorInfo.apk

adb shell pm uninstall -k com.embarcadero.IBLite
adb install MobileCodeSnippets\IBLite\Android\Release\IBLite\bin\IBLite.apk

adb shell pm uninstall -k com.embarcadero.ShareSheet
adb install MobileCodeSnippets\ShareSheet\Android\Release\ShareSheet\bin\ShareSheet.apk

adb shell pm uninstall -k com.embarcadero.PhoneDialer
adb install MobileCodeSnippets\PhoneDialer\Android\Release\PhoneDialer\bin\PhoneDialer.apk

adb shell pm uninstall -k com.embarcadero.ImageRotation
adb install MobileCodeSnippets\InteractiveGestures\ImageRotation\Android\Release\ImageRotation\bin\ImageRotation.apk

adb shell pm uninstall -k com.embarcadero.SendCancelNotifications
adb install MobileCodeSnippets\Notifications\SendCancelNotification\Android\Release\SendCancelNotifications\bin\SendCancelNotifications.apk

adb shell pm uninstall -k com.embarcadero.WebBrowser
adb install MobileCodeSnippets\WebBrowser\Android\Release\WebBrowser\bin\WebBrowser.apk

RunSamples.batEdit

This bat can be anywhere on your system and will run the samples (assuming they are installed) pausing between each one. After the pause it then stops the sample to streamline memory consumption. 

Echo AudioRecPlay
adb shell am start -n com.embarcadero.AudioRecPlay/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.AudioRecPlay
echo ---------------------------------------------------------------------

Echo.
Echo DatePicker
adb shell am start -n com.embarcadero.DatePicker/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.DatePicker
echo ---------------------------------------------------------------------

Echo.
Echo FlashLight
adb shell am start -n com.embarcadero.FlashLight/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.FlashLight
echo ---------------------------------------------------------------------

Echo.
Echo MobileControls
adb shell am start -n com.embarcadero.MobileControls/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.MobileControls
echo ---------------------------------------------------------------------

Echo.
Echo VirtualKeyboardDemo
adb shell am start -n com.embarcadero.VirtualKeyboardDemo/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.VirtualKeyboardDemo
echo ---------------------------------------------------------------------

Echo.
Echo LocationDemoProject
adb shell am start -n com.embarcadero.LocationDemoProject/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.LocationDemoProject
echo ---------------------------------------------------------------------

Echo.
Echo FMMusicPlayer
adb shell am start -n com.embarcadero.FMMusicPlayer/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.FMMusicPlayer
echo ---------------------------------------------------------------------

Echo.
Echo PhotoEditorDemo
adb shell am start -n com.embarcadero.PhotoEditorDemo/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.PhotoEditorDemo
echo ---------------------------------------------------------------------

Echo.
Echo LowLevel3D
adb shell am start -n com.embarcadero.LowLevel3D/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.LowLevel3D
echo ---------------------------------------------------------------------

Echo.
Echo SensorInfo
adb shell am start -n com.embarcadero.SensorInfo/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.SensorInfo
echo ---------------------------------------------------------------------

Echo.
Echo IBLite
adb shell am start -n com.embarcadero.IBLite/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.IBLite
echo ---------------------------------------------------------------------

Echo.
Echo ShareSheet
adb shell am start -n com.embarcadero.ShareSheet/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.ShareSheet
echo ---------------------------------------------------------------------

Echo.
Echo PhoneDialer
adb shell am start -n com.embarcadero.PhoneDialer/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.PhoneDialer
echo ---------------------------------------------------------------------

Echo.
Echo ImageRotation
adb shell am start -n com.embarcadero.ImageRotation/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.ImageRotation
echo ---------------------------------------------------------------------

Echo.
Echo SendCancelNotifications
adb shell am start -n com.embarcadero.SendCancelNotifications/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.SendCancelNotifications
echo ---------------------------------------------------------------------

Echo.
Echo WebBrowser
adb shell am start -n com.embarcadero.WebBrowser/com.embarcadero.firemonkey.FMXNativeActivity
pause
adb shell am force-stop com.embarcadero.WebBrowser
echo ---------------------------------------------------------------------

UninstallSamples.batEdit

This bat needs to be at the same folder as project group

adb shell pm uninstall -k com.embarcadero.AudioRecPlay
adb shell pm uninstall -k com.embarcadero.DatePicker
adb shell pm uninstall -k com.embarcadero.FlashLight
adb shell pm uninstall -k com.embarcadero.MobileControls
adb shell pm uninstall -k com.embarcadero.VirtualKeyboardDemo
adb shell pm uninstall -k com.embarcadero.LocationDemoProject
adb shell pm uninstall -k com.embarcadero.FMMusicPlayer
adb shell pm uninstall -k com.embarcadero.PhotoEditorDemo
adb shell pm uninstall -k com.embarcadero.LowLevel3D
adb shell pm uninstall -k com.embarcadero.SensorInfo
adb shell pm uninstall -k com.embarcadero.IBLite
adb shell pm uninstall -k com.embarcadero.ShareSheet
adb shell pm uninstall -k com.embarcadero.PhoneDialer
adb shell pm uninstall -k com.embarcadero.ImageRotation
adb shell pm uninstall -k com.embarcadero.SendCancelNotifications
adb shell pm uninstall -k com.embarcadero.WebBrowser

Also on Fandom

Random Wiki