Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Can we check internet connection on mobile configuration

Forum

Search UsersRules
Can we check internet connection on mobile configuration
#1
Active user
Points:: 0
Joined:: Jul 28, 2015

Hi everyone,

I am  developing mobile configuration (Android) and I want to check internet connection. Is that possible? If that's possible how can I do that? Can you help me please?

Profile
#2
Active user
Points:: 0
Joined:: Aug 28, 2015

Hello Mehmet Tuğrul SARIÇİÇEK. You can use:

Code
Try 
//Here you can connect to some WS-reference or anything you wish
InternetConnectionAvailable = true;
Except
InternetConnectionAvailable = false;  
EndTry;

Profile
#3
Active user
Points:: 0
Joined:: Jul 28, 2015

Thank you so much but I don't understand I mean, I want to check wifi connection or mobile internet connection. Is that possible as you said ?

Profile
#4
Active user
Points:: 0
Joined:: Sep 1, 2014

Hi Mehmet. The solution provided by Samir is that you have to call an web service to check the internet connection. If the application do not connect to the web service reference Samir want to say you don`t have internet connection. In some cases this method will work, but not always, because the web service can give you an error even if you have internet connection.
Unfortunately i don`t know any valid method to check in your mobile application you have some wireless connection or mobile data connection.

Maybe Timofey can give us a solutin to this problem.

What`s your point Timfoey?

Hope you understand what I want to say.

Profile
#5
Active user
Points:: 0
Joined:: Aug 28, 2015

Actually yes. If you managed to connect to any webservice then you have available internet connection otherwise you don't have access to internet.

Marius Gidu is absolutely right.There are not so many ways to check internet connection.

Profile
#6
Active user
Points:: 0
Joined:: Jul 28, 2015

Marius Gidu,

Hi Marius, I got it what you said and I want to say same yours.

Profile
#7
Guest
Points::
Joined::

Hello,

Would you please provide more information on the task, because even if you have an Internet connection, it might not work well enough, for example.

Do you need to detect that Wi-fi (not billable) connection is available or at least any usable?

Are you trying to make push notifications?

Profile
#8
Active user
Points:: 0
Joined:: Jul 28, 2015

Timofey Bugaevsky,

Hello Mr.Bugaevsky;

I am developing android mobile sales configuration. I want to act one process. I mean if salesman's android tablet or phone have any internet connection(3G or Wi-Fi doesn't matter) this process can work. If it doesn't have any internet connection I want to show "Please check your internet connection, this process can't work without internet".

I hope I can tell what I want.

No I didn't try sir.

İs that possible in 1C?

Profile
#9
Guest
Points::
Joined::

Mehmet Tuğrul SARIÇİÇEK,

For your case I can suggest you the following method:

Users can see the connection status on the status bar in the top of the screen.

In case of problems with connection (it can happen even if the connection exist, but not stable) you can catch the problem as Samir Muqimov suggested and display a warning message.

Think, this is better, than hoping that if the connection is set it is 100% works fine.

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.