Mobile keep screen on programmaticaly?



Discussions regarding 1C:Enterprise for mobile devices with Android, iOS, or Windows Phone.

#1
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Mar 29, 2016
Company: DND Yazılım

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();

 
#2
People who like this:0Yes/0No
Administrator
Rating: 14
Joined: Dec 4, 2017
Company:

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

1C Company support team
 
#3
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Mar 29, 2016
Company: DND Yazılım

Thanks Vladimir,

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

Edited: Hüseyin Çağrı Bayraktar - Feb 12, 2018 11:44 PM
 
#4
People who like this:0Yes/0No
Administrator
Rating: 14
Joined: Dec 4, 2017
Company:

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

1C Company support team
 
Subscribe