Android :: Implementing L2CAP

Aug 13, 2009

With reference to the current work at : http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;...

Can you tell me how can I implement L2CAP Socket?

I need to do it ASAP for a university project. Hoping for optimistic reciprocation.

ADVERTISEMENT

Android :: Implementing In App Purchases

Jan 7, 2010

It looks like Android won't natively support in-app purchases for a while, and when it does there might be a huge user base with devices that don't support them.What's the best way to implement iPhone-like (additional content or services) in-app purchases in Android using the Android Market if possible?

View 4 Replies View Related

Android :: Implementing Action Bar

Jun 24, 2010

I am working on creating an Action Bar like the one from the new Android UI Patterns and I am running into a bit of trouble. I have a ViewSwitcher with two layouts in it. When the user taps the search button I animate between the two layouts. The problem is that the layouts are different sizes and I can't figure out how to make them take up the same amount of space. Here's what I mean. p.s. forgive the bad art, they are just place holders ;)

View 1 Replies View Related

Android :: Implementing An OnClickListener?

Nov 9, 2010

I am trying to do something similar to that of the android lock screen pattern. I have a class that extends a view that I create multiple instances of. These appear on the screen all at once.

I need to be able to click on them individually and have each one turn green individually, however only one on touch listener is listening at once and it belongs to the last dot which appeared, so if I click anywhere on the screen the last appeared dot turns green no matter where I click.

Here is the code for my dot class:

CODE:......

In the code I called newdotdraw multiple times.

View 1 Replies View Related

Android :: Implementing Predictions For IME?

May 14, 2010

Kindly share information regarding how to implement predictions for input methods... I have a new keyboard layout for which I need to provide prediction/sugeestion functionality....

View 2 Replies View Related

Android :: Implementing A Framework ?

Nov 16, 2010

I have 2 apps which should both contain some similar activities.... Now I decided to write a new app, some kind of "framework", which contains these activities, to avoid to write the code twice. How can I use these activities in my other 2 apps ? Whats the common approach for doing this? Adding the "Framework app" to the build path of the two other apps won't work.....

View 3 Replies View Related

Android :: Implementing Gesture Recognition In An App

Jul 26, 2010

I am adding gesture recognition to my app. I have added the view as described in the Android Developers Gestures article but when it comes to adding:

CODEE:..........

where do I put this in my code, do I have to create a new class for it, or can I have it in an inner class, or does it not need a class at all?! I have a set up similar to Lunar Lander which comprises of two files, one of which is a thread that handles pretty much all the physics and drawing of the game. The other file begins the thread and saveInstanceState method. Furthermore, what type is mLibrary?! I cannot find out anywhere! I imagine I will put the OnGesturePerformed method in my thread as this is where I handle all keyUp and Down events.

View 1 Replies View Related

Android :: Best Approach To Implementing Polling

Jul 12, 2010

I am required to work on an application which is be deployed on devices running Android 1.5. The application is supposed to maintain a connection with a server and regularly poll it for new data. The server will notify the client of new data following which the client will connect to the server and download the data.I know that ideally a push based approach will be more conducive here given that we are to run this on a mobile platform. Also, from Android2.2 there is going to be support for C2DM(Cloud to Cloud device Messaging) but as already mentioned this application is for devices running Android1.5.Implementation: I was thinking of using AlarmManager which would Broadcast Intents periodically(poll interval), The Broadcast receiver will then try to connect to the remote server and make data changed check. If the server has an update, the thread will connect to the remote server and download the data from the server.

Problem and Issues: 1. Is this the right way to approach the problem? 2. Is AlarmManager reliable? Would it remember Alarms after a device boot? (I think it does) 3. How do I ensure that battery usage is kept at minimum.(I have heard something about using "keep-alive" to sustain the session for longer time..what is this legend?) 4. What are other things that I need to consider? I am sure I must be missing lots of things here.

View 8 Replies View Related

Android :: Designing And Implementing App Idea

Jun 27, 2010

Does anyone have any good references for designing and implementing an idea I have for an android application. My idea is for an application that stores information and reviews about a specific location and presents this information to user.I have gone through all the tutorials and have been reading up on anything and everything about android. Now I am ready to challenge myself with my first app.

View 4 Replies View Related

Android :: Can't Find Certain Implementing Classes

Mar 19, 2010

I am looking for the implementation of the IAlarmManager.I am interested in the scheduling done by the AlarmManager.setInexactRepeating method and so I started looking for the implementation but I haven't been able to find anything.Internally to AlarmManager, I can see that the actual work is being done by an android.app.IAlarmManager interface.After googling around for a bit there seems to reference to an implementing class called android.app.IAlarmManager.Stub but that is as far I get.I am working with Android 1.6.

View 1 Replies View Related

Android :: Implementing Customized Drawable

Jun 3, 2010

I was trying to get hold of 2D graphics in Android.As a example i want to implement a custom drawable and show it in my Activity But when i run the app i see no rectangle on the activity, can anyone help me out? Where am i going wrong?

View 2 Replies View Related

Android :: Implementing Application With Database

Aug 4, 2010

I need to know how to create simple android application by sqlite database, how can i view the sqlite database and to view the tables has like other mysql server,Let me help to create simple application with database.where i can find the database.

View 2 Replies View Related

Android :: Implementing VoIP Program

Nov 14, 2010

I have some design questions that I want to discuss with people interested in helping me. I am planning to develop a simple VoIP program that allows two Android phones in the same network to use VoIP. My goal is simply to capture sound, send the data with UDP, receive UDP data and play sound.My current design is to have 2 threads: one captures the microphone and sends the data; the other one receives bytes and plays them.I was starting to implement that using MediaPlayer and MediaRecorder. The issue that came up is how do I record and play sound? By that, I would like to know if I need to use a file, although that seems slow, or if there is anyway to have the recording automatically sent to my UDP socket please?Basically, I wonder if I have to record to a file, then to be able to play it, or if I could just pass a socket (for recording and playing).

View 1 Replies View Related

Android :: Best Practice For Implementing Watchdog

Sep 17, 2009

I'm writing an application where real-time knowledge of the GPS state is critical to convey to the user. I request GPS updates at 1000 ms intervals -- when I haven't received another update 1500 ms past the most recent update, I want to display a yellow icon, and 5000 ms after the most recent update I want to display a red icon. Currently, I'm doing it like this: private CountDownTimer gpstimeout; public void onLocationChanged(Location location) { á á if (gpstimeout != null) gpstimeout.cancel(); á á gpstimeout = new CountDownTimer(5000, 1500) { á á á á public void onTick(long m) { setYellow(); } á á á á public void onFinish() { setRed(); } á á }; á á gpstimeout.start(); }

View 3 Replies View Related

Android :: Error On Implementing OnClickListener ?

Mar 30, 2010

I am writing an application which one of the activity has a button and use this button to switch to another activity when clicking that.

The main activity implements the onCreate and OnClickListener as follows:

CODE:...........

When I try to run this program on my emulator, after hitting the button, the program stopped unexpectedly. I follow the instructions of implementing OnClickListener firmly so I don't know what's the problem in my implementation.

View 2 Replies View Related

Android :: Implementing A Touchable Calendar

Jan 12, 2010

I am creating a small calendar control that will be part of an application that runs on a larger-than-phone-sized screen. áThe calendar will simply display the current month and allow users to touch-select a day with an iPhone keyboard style popup bubble indicating which day is chosen.

The problem is that in order to do it with buttons would require 42 tiny buttons, which would probably be a resource hogging solution. Although a keyboard would give me the iPhone-keyboard-bubble-like behavior, i dont think that we can place a keyboard in a static location within a Layout, using it like a View.

So I am wondering what is the best way to go about implementing this. Is my "42 buttons is too many" assumption correct? áIs my keyboard assumption correct? áDo I have to use a SurfaceView (or something) and draw everything myself? áIs there some other grid-like control that can make this simpler?

View 6 Replies View Related

Android :: Implementing Seek Bar For Playing Videos

Oct 1, 2010

I am using seek bar to show the progress of the video which I am playing. I am using Media Player / Video View. But when I move the thumb of the seek bar back and forth, the video is not starting correspondingly from the position of the thumb. Anybody has any idea of how to load the video from where the seekbar's thumb is positioned?

View 2 Replies View Related

Android :: Implementing Push Technology Into Apps

Oct 16, 2009

What are the different ways to implement push technology into your Android app? The client Android app is supposed to receive content (XML Data) pushed by the server. I've looked around and found out it was possible to achieve it with usage off the SOAP protocol. But are there some better ways top implement push? The main concern in this project is the phones battery life, all off it has to happpen over WiFi, pushed content has to be viewable on the device immediately.

View 12 Replies View Related

Android :: What Is Operational Process Of Implementing L10n?

Jul 20, 2009

How to implement Android system l10n ´╝čIt has been l10n in German.What is different between Android and Linux in realizing system localization What is Operational process of implementing Android l10n ? What is needed to implement Android system localization? such as Unicode UTF8, charset,other anything else?

View 3 Replies View Related

Android :: Getting Started Designing And Implementing An Idea For App

Jun 27, 2010

Does anyone have any good references for designing and implementing an idea I have for an android application.

My idea is for an application that stores information and reviews about a specific location and presents this information to user.

I have gone through all the tutorials and have been reading up on anything and everything about android. Now I am ready to challenge myself with my first app.

View 1 Replies View Related

Android :: Way To Implementing Flood Fill Algorithm On Bitmap?

Jul 22, 2009

Can some one help me out with implementing flood fill algorithm on the bitmpap. I have tried various algorithms but either they seem to be too slow or i get a stack over flow exception.

View 4 Replies View Related

Android :: Store Second Value Beside Each String Without Implementing New Adapter Class?

Oct 14, 2010

I want to create a ArrayAdapter for one spinner. So each element contain one string (which will be displayed in the spinner/list) and one value (e.g. an ID). How I can easily store a second value beside each string without implementing a new Adapter class?

View 2 Replies View Related

Android : Implementing Custom Way To Lock/unlock Phone

Sep 9, 2010

Is it possible to implement a custom way to lock/unlock an android mobile phone?I know that in versions 2.1 from android and before, there was only the locking pattern available, and that in version 2.2 it is now possible to set a password as well, but what if i want to make a custom way of locking/unlocking it myself (such as recognizing handwriting, or making some different alternative method for the locking and unlocking process)?Is it possible to achieve this through an application? or would it be necessary to make a version of the Android OS based in the same source code but with changes within it?If it would be necessary to make a different custom version of Android, can anyone give me any hints or tips as to how and where in the source code files are the blocking options considered?

View 1 Replies View Related

Android :: Implementing Multi Select (check Boxes) ListPreference

Aug 29, 2010

on implementing a multi-select (check boxes) ListPreference on Android? Would I have to extend the ListPreference? Is there any classes already documented to do this?

View 1 Replies View Related

Android :: Service Path To Choose For Implementing Large Upload?

Jul 17, 2010

I am trying to implement a RESTful API in which I have to upload files that are relatively large for a mobile platform. The upload could take anywhere from 30 seconds to 5 minutes.I would like my application to be completely usable while the upload takes place. I've been doing some research and I've come across a few methods from which I can't decide which is the correct solution to my problem.Using an IntentService -- handles the worker thread so I don't have to. Using my own type of Service-- still need to implement an AsyncTask to handle the large process. Implement an AsyncTask in a singleton file that would allow me to do all the work there but without using the service class. My question is which method is the best -- if one isn't listed but is a more apt solution to my problem then I would appreciate suggestions.After researching all these methods I am still also confused on one thing. Lets say I upload a 2MB files, but I want to know when it is done. For example, lets say I have a service that uploads an image and returns and imageID -- I need to be able to know when that service returns an imageID -- process that and then move on to the next upload until the rest are finished.

View 5 Replies View Related

Android :: Native Way Of Implementing Publish Subscribe Between Droid Widgets

Jul 16, 2009

I have a custom EditText and a TextView in an Activity. The custom EditText traps for key presses and calculates the number of character entered and wants to publish the character count to the TextView. Do I use the java.util.Observable/Observer way ? Or is there a more native android method to achieve this?

View 1 Replies View Related

Android :: Security Exception While Implementing Global Search For Messaging

Apr 16, 2010

I am trying to enable global search for messaging application (i.e., messages can be searched from home screen search box). I have followed all the steps given in http://developer.android.com/reference/android/app/SearchManager.html

I am getting the following exception

CODE:...

I have set permission in MmsSmsProvider.java file for read, write sms and global search, but still I get this error.

View 1 Replies View Related

Android :: Implementing A Robust Persistent Undo/redo Feature

Oct 27, 2010

I'm writing a bitmap editor where I use the Command Pattern to represent actions that will transform the document. I keep all the commands executed so far in a list and, to implement undo, I restore the document to its initial state and then replay all but the last command.

I would like my undo/redo system to have the following feature: When the user closes the editor and returns, the document, including the available undo and redo commands, should be restored to the state it was in when the user left.

I'm implementing this for Android where your application can be given very little notice before it will be cleared from memory if e.g. the user gets a phone call. Also, some of my commands are e.g. a list of all the x,y co-ord the user painted on so these might take a few moments to save to disk.

My current idea is as follows:

When a new action is performed, the command object is added to a list S for commands that need to be saved to disk.

A background thread is used that will continually take commands from list S and save them to disk. The postfix of the filenames used will be numbered in sequence. For example, if the user filled the screen then drew 2 circles, the command files might be called FillCommand1.cmd, DrawCircleCommand2.cmd, DrawCircleCommand3.cmd.

Periodically, we save a "checkpoint" command whose purpose is to store the full document state so that, even if one of the .cmd files is corrupted, we can restore a recent version of the document.
When the user exits the app, the background thread attempts to finish up saving all the commands it can (but it might get killed).

On startup, we look for the most recent .cmd file that represents a checkpoint that we can load successfully. All the .cmd files we can load after this (i.e. some files might be corrupt) go in the redo command list, all the .cmd files we can load between the first checkpoint loaded and the oldest checkpoint we can load go in the undo list.


I want the undo limit to be about 20 or 30 commands back so I need extra logic for discarding commands, deleting .cmd files and I've got to worry about multi-threading behaviour. This system seems pretty complex and will need a lot of testing to make sure it doesn't go wrong.

Is there anything in Java or Android than can help make this easier? Am I reinventing the wheel anywhere? Maybe a database would be better?

View 2 Replies View Related

Android :: Implementing A Timer Thats Active All The Time - Even During Screen Timeout

Oct 31, 2010

I've implemented a Service in my android app that starts a timer (using the standard java.util.Timer and java.util.TimerTask mechanism) to do some processing in the background on a pre-defined interval.

CODE:...

The service is started / stopped by my application like this.

CODE:..........................

As long as the phone is active (no screen-timeout occured), the service is running fine, and the Timer is performing its job at the defined interval. Even when I quit the application (using the back button), the timer remains active.

However, as soon as the phone goes into timeout, the timer task is no longer running stable. If I leave the phone in timeout for several hours (at night), I would see that on random occasions (sometimes a several hours interval) the timer kicked in.

Also, when the phone is activated again, all timer runs that have been queued are suddenly executed in one shot before resuming back to the normal interval.

What would be the right way of implementing a timer that continues to run properly, even after the phone has gone into timeout. Should I resort to using the PowerManager and WAKE_LOCKS (as described here http://code.google.com/android/reference/android/os/PowerManager.html), or is there another mechanism ?

View 1 Replies View Related

Android :: Implementing DLNA / UPnP (Win7 Play To) On Mobile Device

Nov 5, 2009

For a semester project, I had the idea to implement Windows 7's Play to infrastructure to either use a phone as the end point (the player) or to stream stuff from the phone to a Windows 7 machine. Does anybody have experience working with this API? Is this do able over a couple of weeks (prototype, just proof of concept, not end-user ready) or is it too much for a project of this scope? Note: I'm not looking for code samples, just an assessment of the feasibility of this project. If you have any documentation from MS or otherwise that would be awesome although not the crux of the question.

I discovered that the Windows 7 Play-to functionality is based on DLNA and any device supporting DLNA (I think) can be used as a destination for the Play-To context menu. However, I'm having a really difficult time finding any sort of documentation on DLNA. I'm wondering if you need to be a member of the DNLA to actually get access to the spec? Alternatively, I know DLNA is built on UPnP, it wouldn't exactly do what I want, but it would be a step in the right direction, so, to revise my question does anybody know of any open-source C/C++ or Java (preferable) libraries that would help me implement UPnP or DLNA?

View 1 Replies View Related

Android :: Implementing Filterable Cursor Adapter - How To Invoke/refresh Filter

Jun 15, 2010

I've overriden runQueryOnBackgroundThread and done what I've needed to do for the corrent query to be excuted with a given constraint. My current challenge is figuring out how to actually pass in the constraint. I've got an ActivityList which I'd like to filter on a stored preference. I'm thinking I will need to perform a filter during onStart such that the most recent preference changes are picked up. All that is in place, just not clicking on how I'd actually cause the filter to happen!

View 2 Replies View Related

Android : Wire A Button Action Without Activity Implementing View.OnClickListener

May 11, 2010

I'm starting with Scala + Android (and using the sbt android plugin). I'm trying to wire a button action to a button without the activity implementing View.OnClickListener.

The button click fails at runtime because the method cannot be found. The document I'm working through says that I need only declare a public void method taking a View on the action, and use that method name in the layout.

What have I done wrong? MainActivity.scala package net.badgerhunt.hwa

import android.app.Activity
import android.os.Bundle
import android.widget.Button
import android.view.View
import java.util.Date. Code...

View 1 Replies View Related

Android :: Implementing Sync Adapter / Sync Icon Wont Disappear

Oct 18, 2010

I'm implementing my own sync adapter and everything works great. A strange i'm having is that after the sync is over, the Android still shows the sync icon (the one with the rounded arrow) in the account activity, and that someone (i guess its the account manager) repeatedly calls the sync again and again, every 30 to 60 seconds. Now i tried all sort of things to test this issue and i have discovered something strange. In my code, i do resolver.applyBatch every 50 new rows. (each new contact i sync has about 5 rows). If i remove the applyBatch (which means i retrieve the data from the next, sort it and prepare it, but never "commit" it) - the problem goes away. The icon disappear and the account manager never calls it again on its own (I'm using Android 2.1). I must also state that no exception is being thrown in any of the cases and that all the methods finish gracefully.

View 2 Replies View Related

Android :: ListView Using Custom ArrayList Adapter - Implementing Custom Filter

Jun 18, 2010

I have seen examples implementing a custom Filter. The Android developer docs talk about implementing a Filterable interface. Does anyone have any advice and/or sample code on the best way to implement filtering in a ListView ?

View 2 Replies View Related

Android :: Implementing Characters Method Using SAXParser On Android?

Feb 8, 2010

I am parsing xml using the SAXParser and want to know if this is the right way to implement the characters method. Assume there's a class-level String variable named elementValue and it is initialized to "" in the startElement method.

Here is the characters method:
@Override
public void characters(char[] ch, int start, int length) {
String charsToAppend = new String(ch, start, length);
elementValue = elementValue + charsToAppend;
}
Is it correct that we need to append to the value we have so far and is the append being done correctly? Also, why does the characters method give the start index? Won't it be zero every time?

View 2 Replies View Related

Android :: Android / Way For Implementing A Customer Signature?

Apr 23, 2009

In my app,I need a customer signature for prooving the customer have seen some informations and validate them.Does anybody knows the Android way for implementing a customer signature?With Windows CE, we can use a signature's specific component, and the customer can use the pen to draw lines. But how can we do this with finger's like mobile phone?It seems to be a very difficult question, and I haven't found an answer to my question yet.

View 4 Replies View Related

Android :: Implementing Video Streaming & Video Playing On Android Application

Aug 15, 2010

Kindly provide me the code/steps for Android application which will provide the Video Streaming & Video playing functionalities by accesssing the Videos from various video websites available on Internet.

View 1 Replies View Related

ADVERTISEMENT