Below is a brief tutorial on how to add a SoundPool to an Android activity.
Declare SoundPool at the top of activity and create an instance.
SoundPool sound1;
int mysound = 0;
Within onCreate Method, add the following code.
sound1 = new SoudPool(5,AudioManager.STREAM_MUSIC,1);
mysound = sound1.load(this,path to file,1);
Next, within your onClickListener event, add the play action.
sound1.play(mysound,1,1,0,0,1);
That's it. Thanks for visiting.
Click here for Car information app
If you are interested in iPhone or Android app development, then you have come to the right place
Wednesday, July 16, 2014
Tuesday, July 15, 2014
How to create a counter in JQuery
Below is a tutorial on how to create a counter with JQuery.
A counter can be useful when you want an event to take place within a certain time frame. For instance, you want your visitors to see a message after 10 seconds. That's what this tutorial is going to focus on.
First, add your JQuery library.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function counter(time) {
var interval = setInterval(function() {
time = time - 1;
$("#container").html("Seconds Remaining: " + time);
},1000);
}
$(document).ready(function() {
counter(10);
});
</script>
<div id="container"></div>
I hope this tutorial on creating a timer in JQuery has been helpful. Check out my latest car info app.
A counter can be useful when you want an event to take place within a certain time frame. For instance, you want your visitors to see a message after 10 seconds. That's what this tutorial is going to focus on.
First, add your JQuery library.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function counter(time) {
var interval = setInterval(function() {
time = time - 1;
$("#container").html("Seconds Remaining: " + time);
},1000);
}
$(document).ready(function() {
counter(10);
});
</script>
<div id="container"></div>
I hope this tutorial on creating a timer in JQuery has been helpful. Check out my latest car info app.
Monday, July 14, 2014
iPhone Camera app tutorial
Below is a brief tutorial on how to launch the camera application from with your iPhone app. Once the image is stored, you can do anything you want with it inside your application.
The first step is adding the following code within your button:
UIImagePickerController *myPicker = [[UIImagePickerController alloc]init];
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
[self presentViewControllerAnimated:picker Completion:NULL];
Once adding this within your button method, the Camera app will launch.
Check out my car app if you get a chance in the iTunes App Store.
The first step is adding the following code within your button:
UIImagePickerController *myPicker = [[UIImagePickerController alloc]init];
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
[self presentViewControllerAnimated:picker Completion:NULL];
Once adding this within your button method, the Camera app will launch.
Check out my car app if you get a chance in the iTunes App Store.
Saturday, July 12, 2014
How to pull data from MySql Database
This brief tutorial will explain how to pull data from a MySql Database. This is useful in the event you have had visitors complete data from a feedback form or imported information through another method.
The first step is connecting.
mysql_connect("localhost","username","password");
mysql_select_db("databasename");
Then, build your query.
$query = "select * from tablename";
$results = mysql_query($query);
while($row=mysql_fetch_array($results)) {
$field1 = $row["name"];
echo $field1 . "<br/>";
}
I hope this tutorial was useful. Please check out my new car app for iPhone if you get a chance
The first step is connecting.
mysql_connect("localhost","username","password");
mysql_select_db("databasename");
Then, build your query.
$query = "select * from tablename";
$results = mysql_query($query);
while($row=mysql_fetch_array($results)) {
$field1 = $row["name"];
echo $field1 . "<br/>";
}
I hope this tutorial was useful. Please check out my new car app for iPhone if you get a chance
Thursday, July 10, 2014
How to create a popup window after clicking link
One of the most basic, but useful javascript functions is creating a resizeable popup window without a toolbar.
Just use the following code:
<a href="javascript:void() onclick="open('url','title of window','width=640,height=400,resizeable=true,toolbars=0'>Test link </a>
I hope you find that useful. See you next time!
In the meanwhile, check out my new car app for iPhone
Just use the following code:
<a href="javascript:void() onclick="open('url','title of window','width=640,height=400,resizeable=true,toolbars=0'>Test link </a>
I hope you find that useful. See you next time!
In the meanwhile, check out my new car app for iPhone
Car Info app for iPhone
Car and Truck Facts with Trivia is the ideal app for automobile enthusiasts, who enjoy learning about and looking up car information. This app allows users to retrieve recall information and lookup car specs based on year, make, model and trim. Car and Truck Facts with Trivia has a section dedicated to the safety ratings of almost every automobile. This app contains an extensive and fun trivia game. If that isn't enough, this app uses your geolocation to find nearby gas stations sorted by lowest gas price average. Not only can users make informative decisions about future car purchases, but one will learn about features of his or her current car or truck. Download today and share your knowledge with friends and colleagues tomorrow!
Download from iTunes App Store
Download from iTunes App Store
Wednesday, July 9, 2014
How to change background color of view in iPhone app
Being able to change the background color of a view in an iphone app can be useful for many reasons. Whether you want to indicate an action or just match other images after an action is taken.
First, in your header file, create a method for your button click. Use the following code:
-(IBACTION)buttonClick:(sender);
Now, in the implementation file, add the following code:
-(IBACTION)buttonClick:(sender) {
[self.view.backgroundcolor colorBlue];
}
Where color blue is, you can add any color from the UIColor class.
Thanks for visiting and check out my car app for iPhone
First, in your header file, create a method for your button click. Use the following code:
-(IBACTION)buttonClick:(sender);
Now, in the implementation file, add the following code:
-(IBACTION)buttonClick:(sender) {
[self.view.backgroundcolor colorBlue];
}
Where color blue is, you can add any color from the UIColor class.
Thanks for visiting and check out my car app for iPhone
Subscribe to:
Posts (Atom)