Android Open Source - worldwondersproject Sync Service






From Project

Back to project page worldwondersproject.

License

The source code is released under:

MIT License

If you think the Android project worldwondersproject listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ciandt.cursoandroid.worldwondersapp.service;
/*from  ww  w  .ja  v a2 s  .co m*/
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

import com.ciandt.cursoandroid.worldwondersapp.R;
import com.ciandt.cursoandroid.worldwondersapp.infrastructure.NetworkUtil;
import com.ciandt.cursoandroid.worldwondersapp.service.syncer.PlaceSyncer;

public class SyncService extends Service {

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        PlaceSyncer placeSyncer = new PlaceSyncer(this);
        placeSyncer.sync(intent);

        if (!NetworkUtil.isConnectionAvailable(this)) {
            Toast.makeText(this, getResources().getString(R.string.withoutconnection), Toast.LENGTH_SHORT).show();
        }

        return this.START_NOT_STICKY;
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

}




Java Source Code List

com.ciandt.cursoandroid.worldwondersapp.ApplicationTest.java
com.ciandt.cursoandroid.worldwondersapp.activity.LoginActivity.java
com.ciandt.cursoandroid.worldwondersapp.activity.MainActivity.java
com.ciandt.cursoandroid.worldwondersapp.activity.PlaceDetailActivity.java
com.ciandt.cursoandroid.worldwondersapp.activity.RegisterActivity.java
com.ciandt.cursoandroid.worldwondersapp.adapter.PlaceCursorAdapter.java
com.ciandt.cursoandroid.worldwondersapp.businesscoordinator.PlaceBusinessCoordinator.java
com.ciandt.cursoandroid.worldwondersapp.contentprovider.WorldWondersContentProvider.java
com.ciandt.cursoandroid.worldwondersapp.database.Database.java
com.ciandt.cursoandroid.worldwondersapp.database.table.PlaceTable.java
com.ciandt.cursoandroid.worldwondersapp.entity.BaseEntity.java
com.ciandt.cursoandroid.worldwondersapp.entity.Place.java
com.ciandt.cursoandroid.worldwondersapp.entity.User.java
com.ciandt.cursoandroid.worldwondersapp.fragment.PlaceDetailFragment.java
com.ciandt.cursoandroid.worldwondersapp.fragment.PlaceListFragment.java
com.ciandt.cursoandroid.worldwondersapp.infrastructure.Constants.java
com.ciandt.cursoandroid.worldwondersapp.infrastructure.NetworkUtil.java
com.ciandt.cursoandroid.worldwondersapp.integrator.BaseIntegrator.java
com.ciandt.cursoandroid.worldwondersapp.integrator.GeneralIntegrator.java
com.ciandt.cursoandroid.worldwondersapp.integrator.PlaceIntegrator.java
com.ciandt.cursoandroid.worldwondersapp.listener.DatabaseOperatorCallback.java
com.ciandt.cursoandroid.worldwondersapp.listener.IntegratorOperatorCallback.java
com.ciandt.cursoandroid.worldwondersapp.manager.DatabaseManager.java
com.ciandt.cursoandroid.worldwondersapp.manager.LoginManager.java
com.ciandt.cursoandroid.worldwondersapp.manager.PlaceManager.java
com.ciandt.cursoandroid.worldwondersapp.manager.RegisterManager.java
com.ciandt.cursoandroid.worldwondersapp.service.SyncService.java
com.ciandt.cursoandroid.worldwondersapp.service.syncer.PlaceSyncer.java
com.ciandt.cursoandroid.worldwondersapp.service.syncer.Syncer.java