# Sample code to determine what platform an app is running on

**URL:** <https://techcommunity.softwareag.com/t/sample-code-to-determine-what-platform-an-app-is-running-on/102330>\
**Category:** Forum\
**Tags:** mobile\
**Created:** [January 21, 2013, 7:41pm UTC](https://techcommunity.softwareag.com/t/sample-code-to-determine-what-platform-an-app-is-running-on/102330 "2013-01-21T19:41:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [January 21, 2013, 7:41pm UTC](https://techcommunity.softwareag.com/t/sample-code-to-determine-what-platform-an-app-is-running-on/102330/1 "2013-01-21T19:41:32Z")

</div>

My mind is blanking out here?

Does anyone have a snippet of code that allows an app to, at runtime, know what platform (iOS, Android, etc?) it is running on? I just need to do one thing differently, and I can’t for the life of me remember how.

Thanks in advance.

Dave

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [January 21, 2013, 8:01pm UTC](https://techcommunity.softwareag.com/t/sample-code-to-determine-what-platform-an-app-is-running-on/102330/2 "2013-01-21T20:01:32Z")

</div>

Disregard… I finally found it (I think):

String platform = System.getProperty ( "mobiledesigner.platform");

Dave

On Jan 21, 2013, at 1:45 PM, "Sutka, David" \< [David.Sutka@softwareag.com](mailto:David.Sutka@softwareag.com)\>

wrote:

> My mind is blanking out here…
> 
> Does anyone have a snippet of code that allows an app to, at runtime, know what platform (iOS, Android, etc…) it is running on? I just need to do one thing differently, and I can’t for the life of me remember how.
> 
> Thanks in advance.
> 
> Dave

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:02pm UTC](https://techcommunity.softwareag.com/t/sample-code-to-determine-what-platform-an-app-is-running-on/102330/3 "2021-04-02T15:02:52Z")

</div>


