Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: MobileDevices.xml is not exist


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 9 - Last Post: May 16, 2017 10:58 PM Last Post By: aidan levy
aidan levy

Posts: 31
Registered: 7/6/16
MobileDevices.xml is not exist  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 1:08 AM
In this [http://docwiki.embarcadero.com/RADStudio/XE7/en/Adding_a_Customized_View_to_the_View_Selector#Customizing_the_Form_for_a_New_View] I see that
" To customize the form, you need to edit the MobileDevices.xml file." and "Go to C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\..." to get it.
I see folder and many other files but MobileDevices.xml is not exist ! I searched in entire PC but nothing found.
What `s going on ?
I work in Berlin 10.1
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: MobileDevices.xml is not exist  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 1:17 AM   in response to: aidan levy in response to: aidan levy
El 10/05/2017 a las 10:08, aidan levy escribió:
In this [http://docwiki.embarcadero.com/RADStudio/XE7/en/Adding_a_Customized_View_to_the_View_Selector#Customizing_the_Form_for_a_New_View] I see that
" To customize the form, you need to edit the MobileDevices.xml file." and "Go to C:\Users\<username>\AppData\Roaming\Embarcadero\BDS\..." to get it.
I see folder and many other files but MobileDevices.xml is not exist ! I searched in entire PC but nothing found.
What `s going on ?
I work in Berlin 10.1

The file was renamed to DevicePresets.xml in XE8:
http://docwiki.embarcadero.com/RADStudio/XE8/en/Adding_a_Customized_View_to_the_View_Selector#Customizing_the_Form_for_a_New_View

aidan levy

Posts: 31
Registered: 7/6/16
Re: MobileDevices.xml is not exist  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 7:18 AM   in response to: Antonio Estevez in response to: Antonio Estevez

Looks like something changed too because I can`t install the package with the view. I made exactly as instruction but without success :(
1. Added in DevicePresets new device and can see it on Multi-Device Preview.
2. Created new package and installed it. I see log - package installed.
3. I reload IDE and see that Package1 is loaded.
But in View it`s not exist ! What`s wrong ?

Can you check if it work for you ?

Edited by: aidan levy on May 10, 2017 6:25 PM
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: MobileDevices.xml is not exist [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 9:38 AM   in response to: aidan levy in response to: aidan levy
El 10/05/2017 a las 17:29, aidan levy escribió:

Looks like something changed too because I can`t install the package with the view. I made exactly as instruction but without success :(
1. Added in DevicePresets new device and can see it on Multi-Device Preview.
2. Created new package and installed it. I see log - package installed.
3. I reload IDE and see that Package1 is loaded.
But in View it`s not exist ! What`s wrong ?

Can you check if it work for you ?

Edited by: aidan levy on May 10, 2017 6:25 PM

Works for me in Berlin Update 2.

Show the text you are added to DevicePresets.xml and the code from the
package unit

aidan levy

Posts: 31
Registered: 7/6/16
Re: MobileDevices.xml is not exist [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 11:12 AM   in response to: Antonio Estevez in response to: Antonio Estevez

Works for me in Berlin Update 2.

Show the text you are added to DevicePresets.xml and the code from the
package unit

1. This is DevicePresets. Just copy of SurfacePro with some changes :

<MobileDevice>
<Displayname>Android TV</Displayname>
<Name>TvBox</Name>
<DevicePlatform Default="True">3</DevicePlatform>
<FormFactor>3</FormFactor>
<Portrait Enabled="True" Width="1080" Height="1920" Top="171" Left="175" StatusbarHeight="0" StatusBarPos="0" Artwork="$(BDS)\ObjRepos\en\Devices\images\SurfacePro.cpng"/>
<UpsideDown Enabled="True" Width="1080" Height="1920" Top="178" Left="172" StatusbarHeight="0" StatusBarPos="0" Artwork="$(BDS)\ObjRepos\en\Devices\images\SurfacePro180.cpng"/>
<LandscapeLeft Enabled="True" Width="1920" Height="1080" Top="175" Left="178" StatusbarHeight="0" StatusBarPos="0" Artwork="$(BDS)\ObjRepos\en\Devices\images\SurfacePro90.cpng"/>
<LandscapeRight Enabled="True" Width="1920" Height="1080" Top="172" Left="171" StatusbarHeight="0" StatusBarPos="0" Artwork="$(BDS)\ObjRepos\en\Devices\images\SurfacePro270.cpng"/>
<Default/>
<UserData/>
<Hidden/>
<Thumbnail>C:\Users\Uri\AppData\Roaming\Embarcadero\BDS\18.0\Thumbs\TvBox</Thumbnail>
</MobileDevice>

I see installed device in Device Manager and Multi-Device Preview.

2. Unit1.cpp ( copied from example) :

#pragma hdrstop

#include "Unit1.h"
#include <System.Devices.hpp>

//---------------------------------------------------------------------------
#pragma package(smart_init)

void initdevice() {

TDeviceInfo::AddDevice(TDeviceInfo::TDeviceClass::Phone, "Android TV",
TSize(1900, 1000), TSize(1900 / 2, 1000 / 2), TSize(1920, 1080),
TSize(1920 / 2, 1080 / 2), TOSVersion::TPlatform::pfAndroid, 326);
}

3. Unit1.h ( copied from example) :

//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#endif
void initdevice();
#pragma startup initdevice 42

after installation success and restart IDE no device added to View. If I try install again I receive message that it exist.
Where is installed views stored ?

Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: MobileDevices.xml is not exist [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 1:16 PM   in response to: aidan levy in response to: aidan levy
El 10/05/2017 a las 20:12, aidan levy escribió:

1. This is DevicePresets. Just copy of SurfacePro with some changes :

<MobileDevice>
<Name>TvBox</Name>
</MobileDevice>

I see installed device in Device Manager and Multi-Device Preview.

2. Unit1.cpp ( copied from example) :

#pragma hdrstop

#include "Unit1.h"
#include <System.Devices.hpp>

//---------------------------------------------------------------------------
#pragma package(smart_init)

void initdevice() {

TDeviceInfo::AddDevice(TDeviceInfo::TDeviceClass::Phone, "Android TV",

You must provide the same name as the one written between <Name></Name> tags of the DevicePreset.xml file:

TDeviceInfo::AddDevice(TDeviceInfo::TDeviceClass::Phone, "TvBox",
aidan levy

Posts: 31
Registered: 7/6/16
Re: MobileDevices.xml is not exist [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 11, 2017 5:30 AM   in response to: Antonio Estevez in response to: Antonio Estevez
You must provide the same name as the one written between <Name></Name> tags of the DevicePreset.xml file:

TDeviceInfo::AddDevice(TDeviceInfo::TDeviceClass::Phone, "TvBox",

After I made all names same it`s success. Thanks !
aidan levy

Posts: 31
Registered: 7/6/16
Re: MobileDevices.xml is not exist [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 15, 2017 11:37 PM   in response to: aidan levy in response to: aidan levy
More problems exist. I created custom view ( for Android TV box ) . Moved controls and deployed apk but when application started I see that it not used my view !
How it`s work ? What a rules for selecting view to current device ?
Steve Jordi

Posts: 111
Registered: 4/19/98
Re: MobileDevices.xml is not exist [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 16, 2017 10:41 PM   in response to: aidan levy in response to: aidan levy
On 2017-05-16 06:37:46 +0000, aidan levy said:

More problems exist. I created custom view ( for Android TV box ) .
Moved controls and deployed apk but when application started I see
that it not used my view !
How it`s work ? What a rules for selecting view to current device ?

It should automatically use the preset if it is correctly defined:
screen size, resolution (dpi), etc...
I did a custom android tablet and it uses it directly, without any kind
of instruction, as soon as it
is deployed on that form factor.

Try to double check your info in the TV Box definition.
--

Steve JORDI - MSc in Geophysics/Volcanology

Geneva, Switzerland / Portland, OR, USA
aidan levy

Posts: 31
Registered: 7/6/16
Re: MobileDevices.xml is not exist [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 16, 2017 10:58 PM   in response to: Steve Jordi in response to: Steve Jordi
Steve Jordi wrote:
On 2017-05-16 06:37:46 +0000, aidan levy said:

More problems exist. I created custom view ( for Android TV box ) .
Moved controls and deployed apk but when application started I see
that it not used my view !
How it`s work ? What a rules for selecting view to current device ?

It should automatically use the preset if it is correctly defined:
screen size, resolution (dpi), etc...
I did a custom android tablet and it uses it directly, without any kind
of instruction, as soon as it
is deployed on that form factor.

Try to double check your info in the TV Box definition.
--

Steve JORDI - MSc in Geophysics/Volcanology

Geneva, Switzerland / Portland, OR, USA

My Android TV have full HD screen : 1920x1080 with DPI 160.
I found this instructions : [ http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Using_FireMonkey_Views .
I see that FireMonkey algorithm prefer the view as " Android 10" Tablet 2400 x 1500 2560 x 1600 320".
How to compel it to use my custom view ?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02