Advertisements:




Modify Android Internal Class(es) / Call Handling


Since the whole android stuff is open source i was thinking about to do some minor modifications in a few internal classes from the com.android. Internal. Telephony package and of course then i would love if somehow my application could use the modified classes. I was thinking about replacing the classes with the original ones at runtime by using reflection or other kind of unknown java tricks. Maybe what i'm trying to do is impossible.

Note: the changes in the internal classes would not change their functionality in any way, its more about extending their functionality so even if other apps would use the modified versions it would not break them!

Why i want to do it? What i'm trying to achieve ? Well i would like to modify the com.android. Internal. Telephony. Gsm. Calltracker internal class so i could do proper call handling (call blocking etc. ) Maybe if you know about another way how to do what i want to i would like to hear about it :)

Note2: i know about the method when you handle the android. Intent. Action. Phone_state, action , but its simply too late to react when this action is broadcasted.


View Full Post With 2 Replies

Related Forum Messages:

Please Follow Index to Quick Jump to the Message.


Transformerfactory Class Not Available In Phone - Dynamically Modify Xml File In It

I want to modify an xml file which is in sdcard dynamically. How can we achieve this in android. I have seen some java code as follows code.

But the transformerfactory class is not available in android sdk. How can we handle above code.


Posted On: Aug 30 . View Related Posts . . View 4 Replies .

Htc Incredible - 32gb Class 2 Considerably Faster Than Internal Mem

Not a very scientific approach, but while migrating files from internal storage to the sd card, i noticed it taking a lot longer than moving the same sized files from my comps hd to the sd.

The same file from my comp took noticeably longer to finish transfering to the internal storage. An ~800 mb file took nearly a minute longer. Also, the music loaded on the sd card is much more responsive in the stock player. The audio i had loaded on the internal mem didn't take forever to load up to the player, but i did feel it was a bit slugish.

I'm always blown away by the size of these micro sd cards (and 32gb on that little thing, are you kidding me!?); But i, in no way, expected the read/write to be faster than whatever they've shoved into the inc for internal memory. I'm really pleased with the new card, but can't help to feel a little disappointed in the inc's memory speed.

Anyone else having a similar experience? Anyone out there know the read/write speed of the internal mem?


Posted On: 07-21-2010, 01:28 AM . View Related Posts . . View 2 Replies .

Service Class As A Seperate .class File

I need to know that do i define the service class as a seperate . Class file or do i define it within my main class of the activity ? Can someone provide me with an example apart from this one. http://developer.android.com/reference/android/app/service.html

Posted On: Sep 2 at 14:37 . View Related Posts . . View 1 Replies .

Handling Ui Events With Mglsurfaceview

Manual is pretty vague even for regular views, and doesn't even mention mglsurfaceview in the ui events overview page.

For starters, all the examples will not work because they rely on the id for the view (e.g. Button button = (button)findviewbyid(r. Id.corky);). I'm having a bad time trying to send ui events back and forth. I used the shotgun solution and attached every input event from the mglsurfaceview to the activity. But i'm craving for something better.

So, anyone brave enough to conjure a simple example with an activity, a mglsurfaceview, and the activity ontouch event saying where was the click relative to the size of the screen? (e.g. W=50%, h=50% for a perfect click on the center of the screen)

Code:.


Posted On: Nov 17 at 8:24 . View Related Posts . . View 1 Replies .

Proper Handling Of Action.media_button

Does anyone know what is the "proper" way of subscribing for the "action. Media_button" - (this is sent by the button on the headset and currently controls the play/pause of the built in player).

The built in music application, registers a broadcast receiver for that action in the androidmainfest which explicitly ties it to that button. If another player wants to "hijack" the button it probably has to register i higher priority receiver and abort the broadcast chain so the media player does not get it.

Would it be better to register for it dynamically (for example when the player is playing, or the application window is open) or register in androidmanifest which theoretically will prevent the built in player form ever working.


Posted On: Apr 3 2009 . View Related Posts . . View 2 Replies .

Handling Widget Interface Events

I'm having a difficult time understanding the right way to do this. To put it simply, i want to generate a reaction within my own widget (e.g. I press a button so a textview changes) - i don't want to launch a separate activity.

Here's some code from my onreceive function (from the widget):

Code:.

R. Id. Widgetleft is a button. Is there something i can put as a pendingintent that would trigger that same onreceive function? Is the only way to do this through a separate service?


Posted On: Jun 9 2009 . View Related Posts . . View 6 Replies .

Handling Touch Events In Mapview

On issue #1, i scavenged some online code snippet and tweaked it to work properly to translate from screen pixel to geopoint::

Code:.

This works in the case where either entire view area is covered with map. However, if you zoom out far enough, you can go off the top or bottom of the map. In this case, mapview. Getmapcenter() returns a point off the map (i.e. , > 90 or < -90 degrees), but mapview. Getlatitudespan() returns the height of


Posted On: Jun 10 2009 . View Related Posts . . View 3 Replies .

Touch Handling Sleep Not Helping Enough On 1.5 / 1.6

I've got this new game engine that's almost done but the input system is killing me. I have a virtual analog stick on the screen and it works great, especially on android 2. 0 (droid) but on any 1. 5/1. 6 device, the touching is causing my game to crawl.

I know all of the standard stuff - i pipe my input events into a queue for my main game thread and then sleep for 16ms which should ensure that no more than 60 motion events are dispatched per second. That works fine but even so, just touching the screen, even with my event handling code commented out (except for the sleep, of course), drops my game from 30fps to 20fps. It's really bad. I bound some keyboard keys to the movement to replace the touch controls for testing and the game maintained a great framerate. That won't work because most phones now only have touchscreens so i really need to figure this one out.

"Wait for android 2. 0" is not a great answer, either. Activity. Ontouchevent with a 16, 20, 32, 50ms sleep before returning activity. Dispatchtouchevent with a 16, 20, 32 and 50ms sleep commented out all code except the sleep to test - problem is still there, so it's not my hander.


Posted On: Dec 29 2009 . View Related Posts . . View 7 Replies .

Confused About Handling Ssl Errors In Webview

I have a webview and i want to capture an error, most likely related to a web page having an invalid ssl certificate (company intranet). Currently the mywebviewclient. Onpagestarted() method is called, and no secure content is shown the the page.generally i would expect webviewclient. Onreceivederror() to be called to handle this situation, although the documentation is not quite clear on exactly what kind of errors this method covers.

Which of course is a method that was removed in 0. 9: http://code.google.com/android/migrating/m5-0. 9/changes/android. Webki. I am not clued up enough to take on the webkit source and can't find any documentation on what if anything has replaced the onreceivedsslerror() method. Is this a bug/omission in the android platform?  How was the "release-1. 0" browser complied with missing classes?  Am i doing something completely wrong?


Posted On: Feb 13 2009 . View Related Posts . . View 3 Replies .

Handling Sensor Events And Optimal Way Of Using Sensorgesturedetector

My dbt is that lets say i have the applications like gallery and calendar which want to use sensor input as another input apart from touch i/p and key i/p and for this there is a utility say sensorgesturedetector(example sensorgesturedetector: http://code.google.com/p/openintents/source/browse/trunk/shoppinglist. ) , Then which of the 2 ways u suggest me to use:

1) we use it the way we use gesturedetector, extending itsonsimplegesturelistener and implementig only the gestures specific to the application. This is simple and straight 2) we have a service to which application can bind and the service will call back when the getsure happens to the application which has been binded. So this service will listen to the sensor events in 1st place and implement the sensorgesturedetectors listeners which in turn would call the applications method and then the application can decide what to do on that specific gesture.


Posted On: Mar 19 2009 . View Related Posts . . View 2 Replies .

Handling Click Events On A Drawable Within An Edittext

I have added an image right of the text in an edittext widget, using the following xml:

Code:.

But i want to clear the edittext when the embedded image is clicked.


Posted On: Aug 24 at 7:39 . View Related Posts . . View 1 Replies .

Modify Activity After Clicking On A Notification

I have a normal notification system that looks like this code.

Notice that i'm using one_action as the action of the intent. What i do is verify the action on the activity and select one of the tabs (it's a tabactivity).

All that works fine if the activity is closed, because the intent will open the activity and then i will decide what to do depending on the action in the intent. But, if the activity is already opened, it launches a new activity. On the other hand, if i add the flag intent. Flag_activity_single_top, the activity is not launched twice but i can't the tab is not chosen either.

So, how can choose a tab by clicking on the notification?


Posted On: Sep 23 at 19:44 . View Related Posts . . View 2 Replies .

Modify Data Retrieved For View From Simplecursoradapter

I have a simplecursoradapter for a list which returns data from a sqlite database as it appears in the database. I would like to be able to change the data as it shows in the view so if i have a long representing a timestamp i can format it using dateformat. Format.

Can anyone recommend a good way to go about this? (Maybe i need to subclass simplecursoradapter and override a method?)

I also keep a foreign key in this record so i would like to be able to get another object from the database and put part of this in the view as well.

Previously i used an arrayadapter but this caused me issues requerying the list.


Posted On: Mar 18 . View Related Posts . . View 3 Replies .

Samsung Moment - Modify - Delete Sd Card Contents

When an app states that it wants permission to "modify/delete sd card contents" when installing. Does that mean it can somehow delete things like pictures on my phone?

I haven't seen this on my moment, but my sis has the "my touch 3g" and some of her apps are giving her this warning.


Posted On: 01-14-2010, 01:06 PM . View Related Posts . . View 1 Replies .

Htc Incredible - App To Modify My Vibrations For Calendar Notifications

Does anyone know a good app that will modify my vibrations for my calendar notifications?

What i need is something that will let me know that i've got a meeting coming up even if i'm somewhere where i've had to silent my phone.

I've tried searching through different vibration related apps on appbrain.

And downloaded a few with no luck.


Posted On: 05-26-2010, 11:24 AM . View Related Posts . . View 8 Replies .

Motorola Backflip/motoblur - Can't View - Modify Or Delete Contacts

Once i imported my motoblur contacts via mymotoblur.com i can't view, edit, or delete them via web browser. When i update the details on my phone, it only updates it on my phone and not on my motoblur.

Posted On: Mar 17, 2010 3:42 PM . View Related Posts . . View 4 Replies .

Modify Value On Rooted Phones / By Directly Accessing Secure Table In Corresponding Database

1) i am wondering if someone can shed a light on this. As i understand it, settings. Secure. http_proxy cannot be modified unless the application has been signed by the platform certificate; does this mean that it is up to the phone manufacturer (in conjunction with the carrier, i suppose?) To release code which could modify this setting? (Even with write_secure_settings permission, my application[*] is not allowed to create or modify this setting. )

2) it is possible to modify this value on rooted phones by directly accessing the "secure" table in the corresponding database. However, when this value is changed, i have noticed the following oddness (which to me sounds like a bug):
I) when the phone is connected to the carrier's network (not wifi), it appears that (all?) Applications honour the http_proxy setting (e.g. It appears gmail and various browsers work just fine through connectbot)
Ii) however, when the phone is connected wirelessly (wifi), most, if not all, applications will ignore the value of http_proxy. For my tests, it appears that dolphin browser sends the first two requests via the configured proxy, and then all subsequent requests go direct.

Does anyone have an answer to this? Can we expect this to change? Or do we need to ask developers of http based applications to change their code?


Posted On: Jan 26 . View Related Posts . . View 2 Replies .

Modify .xml Layout File In Order To Make Elements Inside Linearview Same Size

I would like to create a dialog to display a video title and tags. Below text i would like to add buttons view, edit and delete and make these elements same size. Does anyone know how to modify .xml layout file in order to make elements inside linearview same size?

The current layout file looks like this code.


Posted On: Jul 24 09 at 11:15 . View Related Posts . . View 2 Replies .

Htc Droid Eris - Freezes On Call Screen When Pik Call / Fix It

So on my droid eris, when i hit the volume button on the side, or i go into settings and try and change the volume my screen freezes and after waiting awhile it says its not responding and to force close? This is everytime i try and adjust it.

. Also when i get a call, if i click answer it freezes on the call screen and wants me to force close that also


Posted On: 03-22-2010, 07:13 PM . View Related Posts . . View 3 Replies .

Samsung Captivate - Increase / Modify Size Of "feeds And Updates" Widget

Is there a way to increase/modify the size of "feeds and updates" widget?

Posted On: 09-10-2010, 06:07 PM . View Related Posts . . View 2 Replies .

Using Apps2sd - How To Put Apps On Internal Memory?

I have enomther's w/clockwork recovery and apps2sd. Any widgets i install say "problem loading widget" shortly after installing them. I've read around and found that it's probably because i'm using apps2sd. Is there a way to install widgets to internal memory? Or may another work around to my problem?

Posted On: 2011-03-04 . View Related Posts . . View 1 Replies .

Internal Memory On Lg Esteem 4gb Or 8gb?

I just got my esteem today and i noticed that it only has 4gb in the internal memory but everywhere ive read about this phone says it has 8gb. Anyone care to clarify things for me? Am i crazy or am i doing something wrong or am i not understanding something?

Posted On: February 11th 2012 . View Related Posts . . View 3 Replies .

How To Retrieve Paths To Multiple Sd Cards - Internal & External

I ran into a seemingly simple issue to which i cannot find an answer. The application i am working on needs to read/write data from/to the sd card. All the resourcess are located in a folder rigth on the root of the sd card. To obtain the absolute path to my resources directory.

I wrote something like this:

Code:.

Which results into something like:

Code:.

This works just fine for most devices. However, there is the samsung galaxy s which has 2 sd cards, one internal, and one external. Using the code above, i get the path to the internal sd card. The path to the external card is "/sdcard/sd/" (where i belive "sd" is just the mount point).

Is there any api that i don't find which returns a list of paths to multiple sd cards (if available). Or is there any other way to scan both cards for the existence of my resources folder without hardcoding it myself. Note that changing the location of the resources dir is not an option.


Posted On: Sep 30 . View Related Posts . . View 2 Replies .

Media - Move Ringtones From Internal To External Memory

Is there a way to transfer from internal memory the ringtones to external memory? I tried to day but it wouldnt let me either delete or move the default ringtones in the internal memory. I managed only to copy them to the external folder.

Posted On: 02-21-2010, 11:56 AM . View Related Posts . . View 3 Replies .

Motorola Droid - Not Recognized As An Internal External Command

I just rooted my droid using this guide, installed busybox then made a custom recovery. I know how to use the change directory properly cause i did it enough times doing those things, so i'm pretty sure it's not that.

http://androidforums.com/all-things-root-droid/45764-guide-s-everything-root-related.html

After that my command prompt stopped working for me when i wanted to start doing stuff. It gives me that error; "not recognized as an internal external command, operable program or batch file"
I'm not sure why it's not working for me, not a tech savy guy really, just know how to follow tutorials.
I'm thinking it may be my path variable needs to be fixed some how, but i don't know much else about it, so i haven't touched it.


Posted On: 02-25-2010, 11:47 PM . View Related Posts . . View 12 Replies .

Htc Desire - Auto Reduction Of Internal Storage

My internal storage memory keeps reducing by itself without. Installing a new app or saving new pics etc.

Posted On: 07-09-2010, 07:59 PM . View Related Posts . . View 2 Replies .

Internal Broadcast Receiver That Is Invoked Explicitly By Its Classname

It is possible to create tag with just a classname and no intent filters. The documentation indicates that in this case the receiver is considered internal to that package. The way that receiver is invoked is through sendbroadcast(explicit-class-intent)how is this different from directly calling that functionality as part of the execution line, i do see that the anr has a higher tolerance for a broadcast receiver including the internal ones. Is there another benefit? (I am sure i am missing something. ) Clarification is much appreciated satya

Posted On: May 20 . View Related Posts . . View 2 Replies .

Samsung Galaxy S - How To Move Pics From Internal To Sd Memory Cards

I have a t-mobile galaxy s t-959 and this is the first time i have ever had a smart phone. My internal memory storage is being used up by apps and pics, i bought a 4g sd card and replaced the 2g with the new one. I found out how to have all my new pics stored on the sd card but how do i move all my pics from internal storage to the new sd card? Step by step i am not very tech wise. Second question can i move other things to the sd card other than pics or videos?

Posted On: 11-08-2010, 09:26 PM . View Related Posts . . View 2 Replies .

Motorola Droid 2 - Download Software To Phone Internal Memory From My Pc

I am trying to download software to my droid 2 internal memory from my pc, is there a trick to this?

Posted On: Sep 5, 2010 5:39 AM . View Related Posts . . View 4 Replies .