Main > Forum > 1C:Enterprise Platform > 1C:Enterprise. Mobile platform > Mobile keep screen on programmaticaly?

Forum

Search UsersRules
Mobile keep screen on programmaticaly?
#1
Active user
Points:: 0
Joined:: Mar 29, 2016

Hi,

How can i keep screen on mobile 1c?

I want to not turn off screen opened 1c:enterprise mobile.

For example; (android java code)

Code
final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
        this.mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
        this.mWakeLock.acquire();

Profile
#2
Interested
Points:: 0
Joined:: Dec 4, 2017

Dear Hüseyin Çağrı Bayraktar,

You can implement such code in a 1C:Enterprise add-in for Android and then use this add-in when building your Android app for 1C:Enterprise mobile platform via mobile application builder. For the add-in, in the ANDROID_MANIFEST_EXTENSIONS.XML file, you should specify:

<uses-permission android:name="android.permission.WAKE_LOCK"/>

Best regards,
Vladimir Gurov

Profile
#3
Active user
Points:: 0
Joined:: Mar 29, 2016

Thanks Vladimir,

But how can i do that? Can you send me 1C:Enterprise code for using form modüle?

Profile
#4
Interested
Points:: 0
Joined:: Dec 4, 2017

Dear Hüseyin Çağrı Bayraktar,

Pay attention to articles of this section:

https://1c-dn.com/library/add_in_creation_technology/

The point is that you use the add-in technology to create a separate add-in for your application.

The add-in includes the functionality you cannot implement in your 1C:Enterprise application' code directly.

In general, you can create add-ins by using the Native API or COM technology; for mobile applications, you use the Native API technology for your add-ins. It is up to you what language you use for implementing the add-ins.

Once the add-in is ready, you can address to it from your 1C:Enterprise application's code.

Please refer to code samples in the articles that belong to the section mentioned above.

Best regards,
Vladimir Gurov

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.