Android Open Source - SSPIA Sspia Service

From Project

Back to project page SSPIA.


The source code is released under:

MIT License

If you think the Android project SSPIA 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.fiec.sspia.system;
//  w  w  w . j  a v  a  2  s . com
import com.fiec.sspia.db.SolarDb;
import com.fiec.sspia.main.SolarActivity;
import com.fiec.sspia.mclass.SSNotific;
import com.fiec.sspia.util.TempClass;

import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import android.widget.Toast;

public class SspiaService extends Service{
  private NotificationManager nm;
  private TempClass temp;
  private int NOTI = 0;
  private SSNotific notification;
  private SolarDb db;
  public SspiaService() {
  public void onCreate() {    
    nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
    notification = new SSNotific(this.getApplicationContext(), nm, "default");
    db = new SolarDb(this);
  public int onStartCommand(Intent intent, int flags, int startId) {
    Log.i("gmaTag", "Recibiendo servicio en: "+startId+" : "+intent);  
    return START_NOT_STICKY;
  public void onDestroy() {
    Toast.makeText(this, "SSPIA service stopped!", Toast.LENGTH_SHORT).show();
  private final IRemoteService.Stub sbin = new IRemoteService.Stub() {    
    public int getPid() throws RemoteException {
      return android.os.Process.myPid();
  public IBinder onBind(Intent intent) {
    return sbin;
  public class SBinder extends Binder{
    public SspiaService getService(){
      return SspiaService.this;
  private void show(){
    String[] aux;;
      aux = db.getUserTemp();
      temp = new TempClass(Double.parseDouble(aux[0]), Double.parseDouble(aux[1]));    
      notification.initialize(SolarActivity.class, temp);


Java Source Code List