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: 5
Joined: Mar 29, 2016
Company: DND YAZILIM LTD.

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
Interested
Rating: 16
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: 5
Joined: Mar 29, 2016
Company: DND YAZILIM LTD.

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
Interested
Rating: 16
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
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.