that was obtained before the activity was bound to the service. whenever the activitybinder.transact (0, data, reply, 0); When invoked, the service invokes the Ontransact method, loads the obtained data into the parcel object reply, and then the entire The IBinder object returns activity. MP3 player This is finished, may be very messy, I hope to help you, source code download Link: http://download.csdn.net/detail/sinat_23092639/8933995 Copyright NOTICE: This article for Bo Master original art
reply,
Int flags) throws RemoteException {
String str = data.readString();
Int currentPosition = mediaPlayer.getCurrentPosition();
Float s = (float)currentPosition/mediaPlayer.getDuration();
If(isPlay)
reply.writeFloat(s);
Return super.onTransact(code, data, reply, flags);
}
Yes, I do. It is the IBinder object that was obtained prior to the activity and service binding. whenever the activitybinder.transact (0, data, reply, 0); The service calls the Ontransact method. Load the acquired
The sqlitedatabase class exposes specific methods, such as insert, delete, and update. These methods encapsulate the SQL statements required to execute these actions. Even so, the execsql method allows you to execute any valid SQL statements on the database table, and these actions are what you want to manually execute. At any time, if you modify the value of the underlying database, you should call the ref
Android threads are single-threaded. Therefore, Handler is used to update the UI:
Private Handler splashHandler = new Handler (){Public void handleMessage (Message msg ){Switch (msg. what ){Case OVER:ProgressDialog. dismiss ();Break;Default:Break;}Super. handleMessage (msg );}}. After a thread is running, a notification can be sent to Hanler to notify the main thread to
In the online query, Android version update notification bar with progress bar, drunk, basic is copied over, some code is not complete, even the source download is not, there is also need to download points, not use, really black heart Ah!! I also wrote a custom notification bar Notification, think or write it yourself. Because in the notification bar update, nee
As you know, because of the performance requirements, Android requires that the UI be updated only in the UI thread, and to update the UI in other threads, I've roughly summed up 4 ways to add corrections:Use the handler message delivery mechanism;Use asynctask asynchronous tasks;Use the Runonuithread (action) method;Use the handler post (Runnabel R) method;Here are four ways to
Android Image Deposit System Album update Display instance detailedIn the process of developing Android, we could not avoid the possibility of making a custom album or creating a local folder to store the images we need. Take a photo album, for example, we create a test folder, after a photo is stored in the specified test folder, and then displayed in the album,
Recently there are a lot of small partners want to update the SDK, but for various reasons, not updated, so today I teach you how to update the SDK under winThe first thing to do is to modify the system file hostsThe path basically is similar, oneself according to own system to lookThen use the tool such as text Viewer to open this file, if there is no permission, then find ways to add the ability to edit t
Reference:http://blog.csdn.net/jiese1990/article/details/38373275Http://jingyan.baidu.com/article/fd8044fa834e905031137ac6.htmlWorkaround OneHTTP Proxy Server:mirrors.neusoft.edu.cnHTTP Proxy port:80Solution TwoFirst you need to download a proxy server, open this software, see the generated proxy address in the content options, remember the IP address 127.0.0.1 and port number 8580Then open the Android SDK Manager.exe open the options in ToolsIn the p
Launch Android SDK Manager, open the main interface, select "tools","options...", pop up the "Android SDK manager-settings" window ;
In the Android SDK manager-settings window, in the "http proxy server" and "http proxy port" input boxes, fill in mirrors.neusoft.edu.cn and 80 , and select "force https://... sources to be fetched using http://..." check box. C
There are two sets of methods for implementing view updates in Android, one for invalidate and the other for Postinvalidate, which is used in the UI thread itself and the latter in non-UI threads.
Android provides a invalidate method for interface refreshes, but invalidate cannot be invoked directly on the thread because he violates the Single-threaded model: Android
Introduction: Android SDK Proxy Server to resolve the domestic Android SDK can not update the download problem, often encounter Fitch fail URL error, or nothing is installed. Google has suffered a severe winter in China's user history (comparable to the Ice Age) and spent three days working on the agency problem, but with little success because many agents are in
you want to implement this step in Android, you need to configure the NDK development environment, if you do not want the students can directly put in the demo file. The following method is called to merge the filesThe combined APK file is no different from the latest installation package and has the same characteristic value. Finally, the installation is done via intent.Written in the end: it is possible that some users are using the version of the
1. Android SDK Manager is updated.
1. Update Host
Open the directory C: \ Windows \ System32 \ drivers \ etc. There is a hosts file under the Directory and open it in the editor.
Copy the following fields to the hosts file and save them. Note that the original file content is not modified, but only the content is appended.
203.208.46.146 www.google.com74.125.113.121 developer.android.com203.208.46.146 d
cache in disk.The combination of these two functions allows glide to discard the memory cache and the hard disk cache for this time, which is equivalent to a new request. This forces glide to initiate a completely new data load from the given resource address, rather than taking the cache from the old cache.Appendix:1, "Android image loading and caching open source framework: Android Glide" link: http://bl
Android Update module custom updateThis summary is written because of a bug in the project that is compatible with the Android systemThe Android project was originally using an API-provided download methodas follows:Downloadmanager Downloadmanager = (downloadmanager) getsystemservice (activity.download_service);D Ownlo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.