With the development of the Internet, many applications have a growing demand for computing power and resources. However, mobile devices have limited resources, such as battery life, network bandwidth, storage capacity, and processor performance. Cloud offloading is a main solution to supporting computationally demanding applications on these resource constrained devices. We propose a fast and efficient heuristic algorithm for the scheduling and offloading problems of the application tasks in the wireless network. The heuristic algorithm initially moves the tasks which can be offloaded to the cloud, then successively calculates the energy saving of each offloaded task running on the mobile terminal, and sequentially moves the tasks with the highest energy saving to the mobile device. The saved energy is updated in each iteration in order to cater for the task concurrence. In addition, we also construct a simulated annealing algorithm, which uses the solution generated by the heuristic algorithm as the initial solution, to further optimize the solution obtained by the heuristic algorithm, and depict in detail the encoding method, objective function, neighborhood solution, temperature parameters, and algorithm termination rules. Experimental results show that in comparison to the three algorithms based on nonoffloading, full offloading, and random offloading respectively, the solution generated by the heuristic solutions is better and efficient.