Giter Club home page Giter Club logo

androidnetworkmanager's Introduction

Yo! πŸ‘‹

androidnetworkmanager's People

Contributors

chweez avatar idomo avatar jumaallan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androidnetworkmanager's Issues

Rename Core Methods

This will result to less confusion when using the Library, for new users @chweez. I suggest we refactor the Tovuti and NetworkUtil methods, which are the backbone methods in this project

Tovuti.from(Activity).stop(); Might throw IllegalArgumentException: Receiver not registered

I'm not sure why, but sometimes it's cause to this exception, I think you should add try{}catch(Exception e){} to ignore those exceptions (if you don't know too what it the reason for this problem).
For now I added manually this to my onStop():

try{
    Tovuti.from(this).stop();
}catch(Exception ignored){}

It will be nicer if it will be in the library class and not in my activity onStop().

I would change it be myself, but I can't find the Tovuti.java from some reason, it's show me only the class from java/com/androidstudy/networkmanager (the androidstudy project) while in this morning I saw another file (where the monitor methods return void).

Did you merged both projects or I'm toם tired so I can't find this simple file? πŸ€·β€β™‚οΈ

Detect Connection Type (WiFi or Mobile Data) - Feature

This would help users determine what to do depending on the connection type the phone has, like pull updates if connected to WiFi, or perform background tasks. And maybe allow basic app functionality using mobile data

No internet connection

What about if i have connected to wifi but router is not connected to the internet, in that case nothing is happened, isConnected returns true always.

monitor method should return Tovuti, but return void

From some reason, the monitor method return void when it should return Tovuti (that we can save in our class and use it in onStop activity method).
In this project: https://github.com/AndroidStudyOpenSource/tovuti
everything look ok, but I downloaded this project because it was updated less then a month ago and there the last update was about 3 months ago (and this is version 0.0.2 while there is only 0.0.1).

I also saw this: #5
what answering on my question, but the documentation wasn't updated accordingly.

So i'd like to know which project should I use and which of them won't be supported soon, because I'm a little bit confused...

UPDATE:
I'm seeing that the second project is not found in gradle, so I can use only this project, so please update the documentation so I'll be able to understand how to use it right.

Thanks,
Ido.

Automatic lifecycle management

For now, the user must call Tovuti.from(context).stop() but i want to make it automatic when the Activity/Fragment stops.
So, the way Glide implements this feature is by having a view-less Fragment. The view-less fragment is attached to the activity/fragment where the Monitor is attached and these Fragment receives the lifecycle events of the parent/host thus allowing the Monitor to respond accordingly without user intervention (i.e. calling stop method).
I'll try see if this way will suit us. The only problem is increasing the complexity of the library unnecessarily. What do you think @jumadeveloper?

Connectivity Monitoring - Feature

I would like to add a new feature for Connectivity monitoring and automatic Lifecycle (Activity, Fragment, View and Application - basically Context) management to clear listeners. The Listeners will be added to the ConnectivityMonitor and removed when the host is destroyed i.e. when onDestroy is called.

Basically, the feature would be what image loaders like Glide and Picasso use to stop inflight requests for images to avoid memory leaks.
Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.