List of usage examples for android.content Context startService
@Nullable public abstract ComponentName startService(Intent service);
From source file:ru.kaefik.isaifutdinov.an_weather_widget.AnWeatherWidget.java
public static void startGetWeatherCityService(Context context, int appWidgetId, CityModel cityModel) { Intent intent;/*from w ww . ja v a 2 s . co m*/ Utils.createTranslateWeatherDescription(); intent = new Intent(context, GetWeatherCityService.class); intent.putExtra(PARAM_CITY, cityModel.getName()); intent.putExtra(PARAM_WIDGETID, appWidgetId); context.startService(intent); }
From source file:com.nononsenseapps.feeder.model.RssSyncHelper.java
public static void deleteFeedAsync(Context context, String link) { Intent intent = new Intent(context, RssSyncHelper.class); intent.setAction(ACTION_DELETE_FEED); intent.putExtra("link", link); context.startService(intent); }
From source file:cz.maresmar.sfm.service.web.PortalsUpdateService.java
/** * Starts this service to perform portals update. If * the service is already performing a task this action will be queued. * * @param context Application context/* ww w.j a va2 s.co m*/ * @see IntentService */ public static void startUpdate(Context context) { Intent intent = new Intent(context, PortalsUpdateService.class); intent.setAction(ACTION_UPDATE_PORTALS); context.startService(intent); }
From source file:eu.inmite.apps.smsjizdenka.service.UpdateService.java
public static void call(Context context, int serverVersion, String message) { final Intent i = new Intent(context, UpdateService.class); i.putExtra("serverVersion", serverVersion); i.putExtra("message", message); context.startService(i); }
From source file:com.github.play.app.StatusService.java
/** * Start service with application key/*from w ww . ja v a2 s.c om*/ * * @param context * @param applicationKey * @param nowPlaying */ public static void start(final Context context, final String applicationKey, final Song nowPlaying) { Intent intent = new Intent(ACTION); intent.putExtra(EXTRA_KEY, applicationKey); intent.putExtra(EXTRA_SONG, nowPlaying); context.startService(intent); }
From source file:org.jnegre.android.osmonthego.service.ExportService.java
public static void startOsmExport(Context context, boolean includeAddress, boolean includeFixme) { Intent intent = new Intent(context, ExportService.class); intent.setAction(ACTION_EXPORT_OSM); intent.putExtra(EXTRA_INCLUDE_ADDRESS, includeAddress); intent.putExtra(EXTRA_INCLUDE_FIXME, includeFixme); context.startService(intent); }
From source file:Main.java
static void passDownload(String linkToDownload, String SAVE, String notificationTitle, String fileName, String fileType, String userName, Context mContext) { Intent downloadIntent = new Intent(); downloadIntent.setPackage("com.ihelp101.instagram"); downloadIntent.setAction("com.ihelp101.instagram.PASS"); downloadIntent.putExtra("URL", linkToDownload); downloadIntent.putExtra("SAVE", SAVE); downloadIntent.putExtra("Notification", notificationTitle); downloadIntent.putExtra("Filename", fileName); downloadIntent.putExtra("Filetype", fileType); downloadIntent.putExtra("User", userName); mContext.startService(downloadIntent); }
From source file:ch.carteggio.provider.sync.NotificationService.java
public static void notifyNewIncomingMessages(Context c) { Intent service = new Intent(c, NotificationService.class); service.setAction(UPDATE_UNREAD_STATE_ACTION); service.putExtra(NEW_MESSAGE_EXTRA, true); c.startService(service); }
From source file:net.micode.soundrecorder.RecorderService.java
public static void stopRecording(Context context) { Intent intent = new Intent(context, RecorderService.class); intent.putExtra(ACTION_NAME, ACTION_STOP_RECORDING); context.startService(intent); }
From source file:eu.faircode.netguard.SinkholeService.java
public static void stop(Context context) { Intent intent = new Intent(context, SinkholeService.class); intent.putExtra(EXTRA_COMMAND, Command.stop); context.startService(intent); }