Suppose I have a application which fetch data from network and then showing those data in application. But sometimes internet becomes disconnected so I am showing message that 'Internet not available'. But I want to keep user busy with the application. So I want to do following things but there are some problem in implementation.
1) When network disconnected I want to show message 'network disconnect' and I want to store all data in db. Problem: How will I know network is not available without happening any event?
2) And when network is connected I want to fetch data and store in buffer. Problem : Same, how will I know network is available rightnow?