353
Views
25
Comments
 Check mobile network on or off by user
Application Type
Mobile

I need a mobile plugin or JS that can check if the user has the mobile network on or off? I tried using Device dianostic but it only worked on IOS


2023-03-16 16-29-51
Paulo Rosário

Hello Willian Telatin,

Try the GetNetworkStatus client action from OutsysemsUI.


Hope it helps!

Paulo Rosário

2021-04-17 09-53-48
José Gonçalves

Hi Willian,

GetNetworkStatus() action returns true if the device is connected to any network (Wi-fi, 3G, 4G, etc).

For more options you can check this topic:

https://www.outsystems.com/forums/discussion/56001/network-status-detection/

Regards

2022-08-05 12-14-58
Willian Telatin

Hello, this form is not what I need, I want to check if his mobile network is on, in this case that passed I check if he is connected, but it can happen that his mobile network is on and he is not connected.

2021-04-17 09-53-48
José Gonçalves

You mean active in the app or the mobile phone active?

2022-08-05 12-14-58
Willian Telatin

if his mobile network is active on the cell phone


2021-04-17 09-53-48
José Gonçalves

that's what GetNetworkStatus does, if he's off it returns False

2022-08-05 12-14-58
Willian Telatin

Não é disso que preciso, quero verificar se a rede móvel está ligada ou não, pois a rede pode estar ligada e não tem internet, nesse caso retornará false, mas não retornará para mim se o usuário tiver a rede móvel ligada ou não


2022-08-05 12-14-58
Willian Telatin

Hi Jose, I needed something like this

https://github.com/wizpanda/cordova-plugin-mobile-data#disable
2022-08-05 12-14-58
Willian Telatin

needed an implementation of this plugin, that works on android, in new versions and in old ones


2022-08-05 12-14-58
Willian Telatin


I tried to implement it a while ago but I couldn't, could you help me?


2021-04-17 09-53-48
José Gonçalves

Keep this conversation in english for everyone who wants to follow it.

where did you get so far?

2022-08-05 12-14-58
Willian Telatin
2021-04-17 09-53-48
José Gonçalves

Your URL needs a .git in the end:

https://github.com/wizpanda/cordova-plugin-mobile-data.git

2022-08-05 12-14-58
Willian Telatin

mas e o código JS que enviei no anexo, como ficaria?


2021-04-17 09-53-48
José Gonçalves

I think you don't need the cordova.plugins string.

2022-08-05 12-14-58
Willian Telatin

como seria o código? Eu não entendo? eu preciso de parâmetro de saída?


2021-04-17 09-53-48
José Gonçalves

English please.

Yes, you need an output parameter with the outcome of the function.

2022-08-05 12-14-58
Willian Telatin
2021-04-17 09-53-48
José Gonçalves

It may take a while to test and fix it. 

You can search and learn from tutorials how to use cordova plugins, check this one:

https://www.youtube.com/watch?v=R75ZVmbdCRg

2022-08-05 12-14-58
Willian Telatin
2022-04-29 05-12-00
Rijan Lexter Libunao

did you try the combination of this 2 ?

I believe the GetNetworkType returns 4g/5g when the user is using Mobile data ,
And GetNetworkStatus returns if the user is online or offline

2022-08-05 12-14-58
Willian Telatin

I need to know if his mobile network is connected on the cell phone


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.