Back to project page SMS-Generator.
The source code is released under:
Copyright (c) 2013 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without r...
If you think the Android project SMS-Generator listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.colindodd.smsgenerator.messaging; /* w w w . java 2 s . c om*/ import android.content.ContentResolver; public class MessageTask { private int numMessagesToGenerate; private ContentResolver contentResolver; public MessageTask( int numMessagesToGenerate) { this.numMessagesToGenerate = numMessagesToGenerate; } public MessageTask setContentResolver(ContentResolver contentResolver) { this.contentResolver = contentResolver; return this; } private void checkContentResolverIsSet() { if(contentResolver == null) { throw new IllegalStateException("ContentResolver has not been set via setContentResolver(ContentResolver)"); } } public void generateRandomMessages() { checkContentResolverIsSet(); new MessageHandler().generateRandomMessages(numMessagesToGenerate, contentResolver); } }