Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
eDrive
Commits
11680887
Commit
11680887
authored
Sep 08, 2021
by
narinder Rana
Browse files
initialization and identity place
parent
0cb8b626
Pipeline
#134259
failed with stage
in 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/drive/receivers/ConnectivityReceiver.java
View file @
11680887
...
...
@@ -36,15 +36,23 @@ public class ConnectivityReceiver
public
void
onReceive
(
Context
context
,
Intent
arg1
)
{
ConnectivityManager
cm
=
(
ConnectivityManager
)
context
.
getSystemService
(
Context
.
CONNECTIVITY_SERVICE
);
NetworkInfo
activeNetwork
=
cm
.
getActiveNetworkInfo
();
// NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
// boolean isConnected = activeNetwork != null
// && activeNetwork.isConnectedOrConnecting();
boolean
isConnected
=
activeNetwork
!=
null
&&
activeNetwork
.
isConnectedOrConnecting
();
boolean
isConnected
=
isConnected
(
context
);
//if (connectivityReceiverListener != null) {
Log
.
e
(
"TAG"
,
"ConnectivityReceiver onNetworkConnectionChanged...."
+
isConnected
);
//connectivityReceiverListener.onNetworkConnectionChanged(isConnected);
//}
if
(
isConnected
){
//if Scheduler flag
//else fileObserver Flag
}
}
public
interface
ConnectivityReceiverListener
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment