Back to project page android-uds.
The source code is released under:
MIT License
If you think the Android project android-uds 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 org.imazlwifu.uds; /*from w ww .jav a 2 s.c o m*/ import android.content.Context; import android.widget.Toast; public class Util { public static void shortToast( Context context, String text ) { Toast.makeText( context, text, Toast.LENGTH_SHORT ).show(); } public static void longToast( Context context, String text ) { Toast.makeText( context, text, Toast.LENGTH_LONG ).show(); } /** * clips the object id added in the method <code>onSensorChanged</code> of <code>MonitoredSensor</code> * @param s e.g. "Gyroscope Sensor@420912b8" * @return e.g. "Gyroscope Sensor" */ public static String clipObjectID( String s ) { if( !s.contains( "@" ) ) return s; else { int firstOccurrence = s.indexOf( "@" ); return s.substring( 0, firstOccurrence ); } } }