windows98tips
windows98tips
Windows 98 tips
31 posts
Don't wanna be here? Send us removal request.
windows98tips · 6 years ago
Text
Basics about Menu in Android
Menus in Android 
Menu is the basic navigation method for an application which provides an interactive way to interact with user interface and defines the application actions for its users. In Android version 2.3.X (API level 10) the Menu is the basic building block of the application invoked by the system when user press the menu button on device. In later versions from Android 3.0 on-wards this is replaced by an action bar on the top of device. Android defines the three type of menus for applications Option MenuThe option menu is the primary collection of action items for an application. If you are developing an application for android devices running the Android 2.3.X or lower version then option menu will be created by the system when ever user press the menu button on device.  The Android 3.0 converts this into more effective method using the action bar. Contextual MenuA contextual menu is a floating menu invoked when user performs a long click on an element of the view. Popup MenuA popup menu displays a list of items in a vertical list that's anchored to the view that invoked the menu. You can define the menus in your android application as XML resources which could be inflate in your activity or fragment. See here a sample file defining a menu for an application
0 notes
windows98tips · 6 years ago
Text
Handling input events in Android
Handling Input Events in Android
The input events are the key elements for the user interface on mobile devices. The mobile devices has many ways to interact with device need to be handle in programming. In android you can intercept the events passed by the user during interaction with your app and implement the callback to process the events. In android the activity presents the view to the user and each view object will generate the events based on user interaction. This events could be intercept by each view object using the callback methods or event listeners. In case if you are creating your custom view object you can implement the event handlers for your view object. Event Listeners An event listener is an interface in the View class that contains a single callback method. These methods will be called by Android framework when the View to which the listener has been registered is triggered by user interaction with the item in the user interface. See the list of event listener callback methods here Event Listener Callback method Description onClick() View.onClickListener This is called when the user either touches the item (when in touch mode), or focuses upon the item with the navigation-keys or trackball and presses the suitable "enter" key or presses down on the trackball. onLongClick() View.onLongClickListener This is called when the user either touches and holds the item (when in touch mode), or focuses upon the item with the navigation-keys or trackball and presses and holds the suitable "enter" key or presses and holds down on the trackball (for one second). onFocusChange() View.onFocusChangeListener This is called when the user navigates onto or away from the item, using the navigation-keys or trackball. onKey() onKeyListener This is called when the user is focused on the item and presses or releases a hardware key on the device. onTouch() onTouchListener This is called when the user performs an action qualified as a touch event, including a press, a release, or any movement gesture on the screen (within the bounds of the item). onContextMenu() onContextMenuListener This is called when a Context Menu is being built (as the result of a sustained "long click"). You can use the View.setEventListener() to register the events with view object. There are two ways to implement the event listener for a view object. Register the event listener with view object Example Code :
0 notes
windows98tips · 6 years ago
Text
Android 4.1 Jelly Bean - Whats New
Android 4.1 Jelly Bean User Experience
Android 4.1 Jelly Bean recently launch with great features for users.The most interesting and popular mobile operating system and application development platform presented with exciting features in Google I/O. The new features for android users has created a unique and interesting topic to talk. Today's post is all about the new and exciting features of Android 4.1 for all users who love the platform. Faster , Faster & Faster The buttery and silky user interface is much more faster then previous version. The uniform and reactive responses enhanced the user touch experience and you can enjoy every touch of your finger. Actions With BeautyExpandable notifications added great actions and beautiful user interface provides a complete renovation of your old devices. The mix of actions and beauty creates a bold platform for users.
Tumblr media
Personalized Your PhoneAndroid 4.1 redefines the user experiences by adding the new home widgets now you can personalized your home screen, the home screen will automatically make a room for your favorite apps when you put those on your home screen. Create a new experience with CameraNow swipe the camera to take filmstrip view and automatically select the best picture. Simply share your best moments with new camera enhancements. Smarter Keyboard and Fast Voice ProcessingThe smart keyboard automatically predicts the next word for you before you start typing. More accurate dictionaries and a fast voice processing without moving your voice on cloud for processing. Accessibility for every oneJelly Bean added the accessibility for every one by adding the new gesture mode to reliably navigate the user interface by blind users in combination with speech output. Added support for accessibility plugins to enable external Braille input and output devices using USA and Bluetooth interfaces. Share Your Moments with Android BeamNow tap your phones to share without internet connections using android beam. You can use your phone to pay, share photos, videos and much more with all NFC devices using android beam. Google Now Now get what you want at what time google will present automatically for you using the new google now services. It remembers where you walk and move and keep posting you the latest around that. Now get you android Jelly Bean Phone and enjoy the new experiences. Google Nexus 7 is now available with Android 4.1 Jelly Bean. Like the post the please provide your feedback and if i missed any thing new in jelly bean let me know.
0 notes
windows98tips · 6 years ago
Text
Updating ADT 20.0.0 in Eclipse
Updating the ADT 20.0.0 in Eclipse
ADT 20.0.0 is release in June 2012 to work with latest release of Android 4.1 (API Level 16) release for Jelly Bean. You need to update the ADT20.0.0 version for eclipse in order to develop your applications with API Level 16 of android SDK. Update the ADT20.0.0 from the URL  https://dl-ssl.google.com/android/eclipse/ Go to the Eclipse -> Help->Check for updates and click for updates. If you have any issues then verify the URL or change from https to http. If you will get an error could not found repository then try adding the following line to eclipse.ini (located in eclipse directory) -Djava.net.preferIPv4Stack=true (To use the IPv4) Please provide your comments and if you have any issues in installing or updating the ADT20.0.0.
0 notes
windows98tips · 6 years ago
Text
Designing the Input Controls for Android App
Input Controls in Android Applications
The input controls are key components of your android application.Android provides a wide range of input controls for application user interface like button,textfield,check box,radio button,spinner control and much more. See here the list of basic android input controls. Control TypeDescriptionRelated ClassesButtonA push-button that can be pressed, or clicked, by the user to perform an action.CheckBoxRadio buttonSimilar to checkboxes, except that only one option can be selected in the group.SpinnerPickersA dialog for users to select a single value for a set by using up/down buttons or via a swipe gesture. Use a DatePicker widget to enter the values for the date (month, day, year) or a TimePicker widget to enter the values for a time (hour, minute, AM/PM), which will be formatted automatically for the user's locale.
0 notes
windows98tips · 6 years ago
Text
Get Social Updates of your contact list using Ice cream sandwich
Social Stream API in Contacts Provider
Android 4.0.3 API Level (15) is released for the developers with a new support for social streams in contact list. Now you can add the support to update and manage the social activities from facebook,twitter and other social networks and update the contacts data with simple APIs.  This is really a good stuff added in Android to create good applications around the social networks. Here in this post we are highlighting the APIs you can use to create the new exciting apps with your social networks. Now you could get the status updates, check-ins , activities and photo updates from social stream and associate this data with your contact list. The database table for contacts now have two more Uris ContactsContract.StreamItems and ContactsContract.StreamItemPhotos. In order to read and write the social streams you need to add two more permissions to your application manifest file. Social stream updates are always associated with the raw contacts and can be insert,update,delete or retrieve. You can use the content Uris to add the social stream with raw contact= values(RAW_CONTACT_ID);put. values(TIMESTAMP);put. Builder CONTENT_URI();appendQueryParameter. accountName.RawContacts, =insert. valueslong parseId); Now you can associate the photos with social updatesclear.StreamItemPhotos, values(SORT_INDEX1.StreamItemPhotos, getContentResolver(CONTENT_PHOTO_URI); You can retrieve the social updates of the raw contact id as follows
0 notes
windows98tips · 6 years ago
Text
New Development Tools for Android Developers
New Release for Android Developers ADT 20.0.0
Android SDK r20 and ADT Plugin 20.0.0 is released for the developers to develop the new applications with Android 4.1 (Jelly Bean). This post will list the features of the ADT 20.0.0 Plugin for eclipse for developers. The following dependencies for the ADT 20.0.0 is required to install Java 1.6+ Eclipse Helios (Version 3.6.2) + New FeaturesThe new and improved features in Android ADT Plugin for Eclipse. Application Templates Added new application templates by which you can create the specific type of applications faster using the Android-recommended best practices. Performance The performance is improved in ADT 20.0.0 now the SDK data should be up to 30% faster. Tracer for Open GLES 2.0 New tracing support for OpenGL calls for an application and track the visual results for each call. Lint Enhancements Defined new Lint rules for manifest registrations,duplicate activity registrations,security checks,Fragment class initialization and handler leaks. Created a tighter integration of lint with the layout editor.Added execution of Lint tool on save option for java files. Layout Editor Improved Layout editor with highlighting of important attributes (in bold) , inline preview of colors and images,display attribute tips,better categorization of layout param and much more. XML Editing Added go to declaration support for theme references. The version descriptions are displayed for eachof the API levels.Code completion in XML editor is enhanced. Build System The build system is improved with following features Added automatic merging of library project manifest files into the including project's manifest. This feature could be enable using the manifestmerger.enabled property. Added automatic ProGuard support for the aapt -G flag. This will reduce the overall size of APK file.Added support for building and debugging the NDK projects.Added a new Asset Studio Wizard for padding and turning off background shapes.Added color support in LogCat.Support the application run for multiple devices in single launch. The target tab in the launch configuration dialog includes an option to allow launching on all connected devices. Now boost your development using the new plugin. You can update or install the ADT Plugin from the steps defined on http://developer.android.com/sdk/installing/installing-adt.html Please provide your valuable comments to improve the post. Creative Android Apps
0 notes
windows98tips · 6 years ago
Text
Sample Code - Creating Option Menu in Android
Sample Code - Create a Option Menu for Android Application
The option menu is a core menu of  the application which provides the basic navigation for applications. I have written this post the explain the use of option menu in android application. The best way to create an option menu is to define the option menu in a XML file and inflate the menu resource in onCreateOptionMenu method. Create a project and define an activity as CreativeMenus (you can use any other name for your activity). Create the XML file in res->layout directory as menu.xml Now implement the activity class as follows package com.example.creativeapps; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; public class CreativeMenus extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.layout.menu, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle item selection switch (item.getItemId()) { case R.id.action1: //start another activity startActivity(new Intent(this, CreativelayoutsActivity.class)); return true; case R.id.action2: //TODO: handle the code for action 2 return true; case R.id.action3: //TODO: handle the code for action 3 return true; case R.id.action4: //TODO: handle the code for action 4 return true; default: return super.onOptionsItemSelected(item); } } } To handle the click events on action items you need to implement the onOptionsItemSelected method of your activity class. Get the unique id defined for each item to handle the proper action for click on menu item. See in the above example we are starting the another activity on click of action1. you can extend the example by implementing your own actions. Menus are good to implement for version lower then 3.0 for Android version 3.0 or greater implement the action bar. Please provide your feedback and share this to your creative android friends. Creative Android Apps
0 notes
windows98tips · 6 years ago
Text
New Development Tools for Android Developers
New Release for Android Developers ADT 20.0.0
Android SDK r20 and ADT Plugin 20.0.0 is released for the developers to develop the new applications with Android 4.1 (Jelly Bean). This post will list the features of the ADT 20.0.0 Plugin for eclipse for developers. The following dependencies for the ADT 20.0.0 is required to install Java 1.6+ Eclipse Helios (Version 3.6.2) + New FeaturesThe new and improved features in Android ADT Plugin for Eclipse. Application Templates Added new application templates by which you can create the specific type of applications faster using the Android-recommended best practices. Performance The performance is improved in ADT 20.0.0 now the SDK data should be up to 30% faster. Tracer for Open GLES 2.0 New tracing support for OpenGL calls for an application and track the visual results for each call. Lint Enhancements Defined new Lint rules for manifest registrations,duplicate activity registrations,security checks,Fragment class initialization and handler leaks. Created a tighter integration of lint with the layout editor.Added execution of Lint tool on save option for java files. Layout Editor Improved Layout editor with highlighting of important attributes (in bold) , inline preview of colors and images,display attribute tips,better categorization of layout param and much more. XML Editing Added go to declaration support for theme references. The version descriptions are displayed for eachof the API levels.Code completion in XML editor is enhanced. Build System The build system is improved with following features Added automatic merging of library project manifest files into the including project's manifest. This feature could be enable using the manifestmerger.enabled property. Added automatic ProGuard support for the aapt -G flag. This will reduce the overall size of APK file.Added support for building and debugging the NDK projects.Added a new Asset Studio Wizard for padding and turning off background shapes.Added color support in LogCat.Support the application run for multiple devices in single launch. The target tab in the launch configuration dialog includes an option to allow launching on all connected devices. Now boost your development using the new plugin. You can update or install the ADT Plugin from the steps defined on http://developer.android.com/sdk/installing/installing-adt.html Please provide your valuable comments to improve the post. Creative Android Apps
0 notes
windows98tips · 6 years ago
Text
Use Dialog Fragments in Honeycomb
Using Dialog Fragments in Honeycomb
Honeycomb (Android 3.x) introduced the Fragments to better utilize the UI areas and logic across the multiple activities of the in an application. The showDialog/dismissDialog methods in Activity are being deprecated to promote the DialogFragments This post shows a simple DialogFragment example. The example layout file for the dialog is as follows               Create the Dialog Class The dialog class extends the DialogFragment (to support the DialogFragment on other devices I included the DialogFragment from version 4)import android.support.v4.app.DialogFragment; // ... public class SampleDialog extends DialogFragment {     private EditText mEditText;     public SampleDialog() {         // Empty constructor required for DialogFragment     }     @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,             Bundle savedInstanceState) {         View view = inflater.inflate(R.layout.fragment_edit_name, container);         mEditText = (EditText) view.findViewById(R.id.txt_your_name);         getDialog().setTitle("Hello!CreativeAndroidApps");         return view;     } }Showing the Dialog Box in a Fragment Activityimport android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; // ... public class FragmentDialogDemo extends FragmentActivity implements SampleDialogListener {     @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);         showSampleDialog();     }     private void showSampleDialog() {         FragmentManager fm = getSupportFragmentManager();         SampleDialog sampleDialog = new SampleDialog();         sampleDialog.show(fm, "fragment_edit_name");     }     @Override     public void onFinishEditDialog(String inputText) {         Toast.makeText(this, "Hi, " + inputText, Toast.LENGTH_SHORT).show();     } } Please provide your most valuable comments to improve this post.
0 notes
windows98tips · 6 years ago
Text
New Permissions in Android 4.1
Android 4.1 New Permissions
Android 4.1 defines the new set of permissions for providing the better security to implement for the devices in applications. New Permissions added in Android 4.1 ReleaseREAD_EXTERNAL_STORAGE Provides protected read access to external storage. In Android 4.1 by default all applications still have read access. This will be changed in a future release to require that applications explicitly request read access using this permission. If your application already requests write access, it will automatically get read access as well. There is a new developer option to turn on read access restriction, for developers to test their applications against how Android will behave in the future. READ_USER_DICTIONARY Allows an application to read the user dictionary. This should only be required by an IME, or a dictionary editor like the Settings app. READ_CALL_LOG Allows an application to read the system's call log that contains information about incoming and outgoing calls.WRITE_CALL_LOG Allows an application to modify the system's call log stored on your phoneWRITE_USER_DICTIONARY Allows an application to write to the user's word dictionary.
0 notes
windows98tips · 6 years ago
Text
Faster and Better Apps with Jelly Bean
Faster Apps with Jelly Bean
Android 4.1 recently released by the Google is faster and better in performance. You can experience the better touch response, achieve constant frame rate and better user interface updates. To achieve the consistent framerate , Android 4.1 extends vsync timing across all drawing and animation done by system. All drawings and animations runs in a lockstep against a 16 millisecond vsync heartbeat. Application rendering, touch responses,screen compositions and display refresh every thing on the screen is vsync so the frames don't get ahead or behind. Android 4.1 also added triple buffering in the graphics pipeline for accurate rendering that makes the touches more smoother from scrolling to paging and animations. Android 4.1 also anticipate your finger touch at the time of screen refresh to create the more reactive and uniform response. Google started a Project named Butter to create the Android as more response and better in performance. Project Butter is a processing framework designed to speed up user interface responsiveness, reduce latency, smoothing user experience and graphics processing in smartphones running on Jelly Bean. Android 4.1 provides a opportunity for game developers and high graphics apps with better response for end users.I am still exploring more on Jelly Bean. Did you like the post? Please provide your feedback and enjoy the new test of Jelly Bean.
0 notes
windows98tips · 6 years ago
Text
Using the Contact Provider to Display the Contact List
Contact Provider Sample
Contact Provider provides the access to the contact database and allow the apps to add,delete,modify and query the contact database. This post is focusing on displaying the list of contacts to a list view. Create a android project in eclipse and open the main.xml from the res->layout->main.xml. Add a list view to the xml layout file Add a new xml layout file named as contact_info.xml     Now open the activity class and add the following code.
0 notes
windows98tips · 6 years ago
Text
Android 4.1 Rich Notifications
New Notification APIs in Android 4.1
Android 4.1 (Jelly Bean) expanded the notification framework Now the apps can create big and rich notifications those can be expand or collapse with a pinch or swipe. The notifications added new content types including photos and have a configurable priority. The user could have multiple response for a status notification. Now with enhanced notification framework the android app developers can build really good notifications for the user. BigTextStyle — a notification that includes a multiline TextView object.BigInboxStyle — a notification that shows any kind of list such as messages, headlines, and so on.BigPictureStyle — a notification that showcases visual content such as a bitmap.In addition to the templated styles, you can create you own notification styles using any remote View. Apps can add up to three actions to a notification, which are displayed below the notification content. The actions let the users respond directly to the information in the notification in alternative ways. such as by email or by phone call, without visiting the app. With expandable notifications, apps can give more information to the user, effortlessly and on demand. Users remain in control and can long-press any notification to get information about the sender and optionally disable further notifications from the app. The setStyle() API allow you to set the new style for the notifications. The multiple actions to the notification can be add using addAction() API. The setPriority() method could be use to define the priority of the notification for the system.
0 notes
windows98tips · 6 years ago
Text
Basics of Notifications in Andoird
Android provides the notification APIs for applications to push the notifications for the user on the device.
Toast Notification
The toast notifications invoke on the surface of the window.You can invoke the toast notifications from the Activity or Service.The Toast notifications acquire the area equivalent to the message and automatically fades. The user current activity is interactive upon the display of the toast notification. The toast notification doesn't provide any interaction to the user. They are only useful to send the read only messages as notification to the user. Create the simple toast notification in your activity class. Context context = getApplicationContext(); CharSequence text = "Hi,I am a toast notification"; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); 
Status Bar Notification
The status bar notification provides the interaction with the user. The notifications which need a response from the end user should add to the status bar notifications. A status notification add a icon to the system status bar and a notification message in the notification window. When user selects the notification the android fires and Intent  to launch the Activity defined by notification. The sound,vibration or flashing lights could also be used for notification. The background services need to notify the event which needs user response in the status notification. The status notifications are managed in android using Notification and NotificationManager classes.  The Notification class defines the notification which includes the status icon, message and the action (Activity to start as response from user). The Notification manager class manages the notification system service and handle all the status bar notifications in android. To create a simple status notification you can follow the following steps Get a instance of the Notification manager as follows String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager =  (NotificationManager) getSystemService(ns); Now create a notification object as follows int icon = R.drawable.notification_icon; CharSequence tickerText = "StatusBar"; long when = System.currentTimeMillis(); Notification notification = new Notification(icon, tickerText, when); Context context = getApplicationContext(); CharSequence contentTitle = "My notification"; CharSequence contentText = "Hello World!"; Intent notificationIntent = new Intent(this, LanuchAsResponse.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);  Now notify the notification to the status bar as follows private static final int SAMPLE_ID = 1; mNotificationManager.notify(SAMPLE_ID, notification);   
0 notes
windows98tips · 6 years ago
Text
Simple Code for Action Bar using XML Layout
This post is explaining the example for how to create a top action bar for a application using the simple XML layout. Create a android project in your eclipse editor and open the main.xml (layout file located in project res directory). Add the following XML layout See the below code for your activity class package com.example.creativeapps; import android.app.Activity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.GridView; public class CreativelayoutsActivity extends Activity { GridView myGrid; String listContent = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); myGrid = (GridView)findViewById(R.id.grid); //create the array adapter for the grid view ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, listContent); myGrid.setAdapter(adapter); } } Now run the application and see the following output with action bar.
Tumblr media
Simple Action Bar
0 notes
windows98tips · 6 years ago
Text
Restarting Innovation - Big Software Sliced into Small Apps
Restarting Software World By Slicing the Big Software into small apps
The software world is restarting the innovation by slicing the big software into small apps and serving to large community! real users. Today's web world is changing the definition of the software from development to usage. The Big Software is now sliced into small apps and reaching to more real consumers. The complex technologies moved into black box and the simple technologies are in hand of end users. The changes are already started in year 2008 when the mobile applications market started emerging. Now you can see the social apps and much more is very hot today. The next future of the business will be Apps which redefine the business by giving better access to all the end users.You can see the changes that now the big accounting software's turned into personalized accounting apps, social activities are associated with technology using apps,banking software is sliced into small apps and distributed to its real end users. This exciting change is happening due to advancement in web technologies, users awareness and device revolution to create a better interconnect world. The businesses are reducing there cost of operations, developers could get more opportunities and end users will have more access and confidence. The smart phones, smart tablets and more smart embedded devices are increasing in the world and motivating the developers to create more beautiful world around the technologies. The desktop apps, web apps, cloud apps, mobile apps, social apps and much more ways of apps are emerging to create a better life for every one. The traditional and legacy software applications will be completely removed from the world and the new era of software will be start where the big technology will be served into small and creative apps to its real end users. So are you ready to join the restart of software innovation. Push the button of apps and start new innovation. If you like the post please share your comments. Thanks Creative Android Apps
0 notes