Android :: Determining Who Passed An Intent To You
Aug 18, 2009
I was wondering if there is a way to determine who passed an intent to my application. For example, I have a service, that I want to act differently depending on who passed the intent (for security reasons). I'm trying to sandbox each calling application, so they only have access to their data stored in my application.
For it to be secure, I cannot trust any application to be truthful about the identifying data it is passing into my service. Therefore, I need some system way of identifying who sent the intent in a way that the calling application cannot change that information. I don't know if it is possible, but I can't find anything in the Intent class, and I was wondering if there may be another structure which does what I want it to. If it is not possible, I would like to get some type of mechanism to do this in the roadmap.
View 13 Replies
Jun 28, 2010
I want to receive a data which is passed using intent from another page.
View 1 Replies
View Related
Aug 25, 2010
How can I tell if a device is using HTC's SenseUI? I thought about using android.os.Build information, but they seem inconsistent. Is there a more definitive way? I need to be able to tell if I can launch the calendar by using com.android.calendar or com.htc.calendar.
View 1 Replies
View Related
Jun 28, 2010
My question is- with the telephony manager, is there a way to determine what number the phone is off hook with? I thought getLine1Number() might return that phone number that is being dialed, but it is not what I expect. I am working with 2 emulators, and added a log line so that I could see what that method is doing. When dialing another emulator, I expected getLine1Number() to return 5554, but it was 15555218135. Perhaps there is another method I should be using instead? Do I need to be into the source code to get the information I want?
View 1 Replies
View Related
May 11, 2010
I'm trying to pass a bundle of two values from a started class to my landnav app, but according to the debug nothing is getting passed, does anyone have any ideas why?
View 1 Replies
View Related
Jul 19, 2010
I'm using a UNIX socket to facilitate communication on and Android device between a system level daemon I've got running in C and an application I've got running in Java. I'm much more of a C coder than a Java coder, so I'm having some issues when trying to read in data from the socket on the Java side. Currently, my code is as follows:
try{//Prepare to write the command and read the ACK
InputStream is = receiver.getInputStream();
OutputStream os = receiver.getOutputStream();
BufferedReader in = new BufferedReader(new InputStreamReader(is));..............................
View 1 Replies
View Related
May 11, 2010
I looked over SensorManager and was still unsure, how do I detect if the phone is looking at true north (or any other direction for that matter).
View 1 Replies
View Related
Aug 6, 2010
How do you determine (programatically) if an Android device is: rooted Running a cracked copy of your software or rom. I have some sensitive information in my database, and I would like to encrypt it when the phone is rooted aka the user has access to the database. How do I detect that?
View 2 Replies
View Related
Nov 15, 2010
Is it possible to determine the unique bluetooth MAC address for an iPhone and an Android (and to a lesser extent, other smartphones) from within an app on said device? Is my assumption that the MAC address is universally unique correct? A general yes or no would be helpful. Example code in the case of an iPhone or an Android would be extremely helpful.
View 2 Replies
View Related
Nov 14, 2010
I have created multiple bitmaps - one for each folder (mdpi, hdpi, ldpi). Can someone show me some code or point me to the appropriate method that will allow me to detect which resource Android decided to load.
View 4 Replies
View Related
Jun 9, 2010
Question: How do you programmatically distinguish between directories and regular files in the assets folder?
When using AssetManager to access files in the assets folder, it seems impossible to determine if a file is in fact a file or a directory. You get the list of files from the list method and then open the file using the open method. I thought perhaps using the openFd method to get the asset file descriptor (and then subsequently requesting the normal file descriptor) would provide me some information. But requesting the file descriptor for a directory results in an IOException (which makes sense since what would it mean for a directory to have a file descriptor...?).
Currently I'm relying on that IOException (resulting from attemptng to open a directory in the assets folder) in order to determine if a file is in fact a directory. (Opening a regular file works just fine). This seems like a bad idea. Any other suggestions to distinguish between a file and a directory?
View 1 Replies
View Related
Apr 21, 2009
I am calling the ZXing scanner from Screen-A using intents. Once the scan is done control of course returns to the code behind Screen-A and I do some other work before calling Screen-B. Problem is the screen is black during this work period and I cannot determine the proper context to use to display a "working..." Toast/msgbox.
View 2 Replies
View Related
Jun 23, 2010
I'm working on an Android App where the user has different options for sorting the displayed data that comes from the database. Currently my orderBy string that I pass to Androids query() method looks like this:
"LOWER("+columnName+") ASC"
The problem with this is that if the data type in the column specified by columnName is integer, calling LOWER() on it will cause it to be sorted alphabetically, i.e. based only on the leftmost digit, which of course doesn't make any sense for numeric data. Hence I only want to apply LOWER() if the data type of the column is not integer. What I have in mind is a statement like this:
"CASE WHEN [data type of columnName is integer] THEN "+columnName+" ASC ELSE LOWER("+columName+") ASC END"
The part in the brackets is what I don't know how to do. Does SQLite provide a function to determine a column's data type?
View 3 Replies
View Related
Aug 5, 2010
As asked, is it possible? Here's part of my code. I don't know how to change it.
CODE:............
And yes, the error toast came up!
View 1 Replies
View Related
Jun 28, 2010
When we want to pass data from an activity to a sub activity we use the is there any event handler that handles this?
View 1 Replies
View Related
Apr 4, 2010
I thought I'd share a script that I've been working on: http://www.anddev.org/viewtopic.php?p=30732
It lets you generate parameterizable histograms of Android Market sales by automatically downloading data from Google Checkout.
View 6 Replies
View Related
Jul 27, 2010
I am writing a music player for esoteric music formats, and have defined mime types for them in my Manifest.
However, the standard music player is always started even though it can't handle the format. Looking at logcat I see;
: D/MediaScannerService( 688): IMediaScannerService.scanFile: / sdcard/download/Cybernoid.sid mimeType: audio/prs.sid : I/ActivityManager( 578): Stopping service: com.android.providers.media/.MediaScannerService : I/ActivityManager( 578): Starting activity: Intent { action=android.intent.action.VIEW data=file:///sdcard/download/ Cybernoid.sid type=audio/prs.sid flags=0x4000000 comp={com.android.music/com.android.music.MediaPlaybackActivity} }
.. so it seems the component is explicitly set to the music player ? Is there any way around this ?
View 3 Replies
View Related
Aug 4, 2010
Why below code is throwing nullPointer exception in last line (when accessing javaInterface.mValue) This line through NullPointer, so basically it is not being set. even though the javascript is correct and has been verified using FireBug that it returns expected string.
There are few lines above this code chunk but it is irrelevant this problem
CODE:................
View 2 Replies
View Related
Aug 8, 2010
I have an activity that implements LocationListener in my application and my onLocationChanged method has been working perfectly up until recently. For some reason the Location object being passed into the method is null. My question is, why is it null? Does it pass in a null object if it cannot acquire a location?
My GPS is on and I have it set to pull a location from the GPS, and I know my GPS can get a fix on me as I used Maps and had it locate me.
Also, I have the permission for my app set as:
CODE:.................
I don't believe permissions is the issue though, as my activity was working beforehand and I have not altered the permissions since then.
Here is the code that determines the provider of the location object:
CODE:.............
Here is the LogCat output of the error:
CODE:..............
I have tested the same code on another device (an HTC MyTouch 3G to be precise) and it works flawlessly with the GPS, however on my Motorola Droid it crashes.
View 3 Replies
View Related
Dec 14, 2009
This subject originates here: http://groups.google.com/group/android-beginners/browse_thread/thread...
To sum up:
When I click on an item in the ListView, the background color that gets changed is not that of the clicked item but instead of the other item in the opposite side relative to the middle item:
1 <-- I click here 2 3 <-- Acts as a mirror 4 5 <-- This is the one that gets changed
1 2 <-- This is the one that gets changed 3 <-- Acts as a mirror 4 <-- I click here 5
This problem persists even when I use CheckedTextView like what is suggested in the post.
I use the latest stable SDK.
This problem occurs when the target platform is Android 1.6, 2.0 or 2.0.1.
The problem does not occur when the target platform is Android 1.1 or 1.5.
However, the problem will also occur when the program is compiled for 1.5 and run in 2.0.1.
The simple problematic code can be found here: [url]
There I also put the screenshots showing the problem: demo01.png: I click an item. demo02.png: the clicked item doesn't get changed but the reflective item does.
Is this a bug in newer Android platforms?
If it is intended, what is the reason and could you please show me how I should fix my code?
View 6 Replies
View Related
Oct 6, 2010
Is there a way to scale the Drawable passed to TextView.setCompoundDrawables ? The following code works very well but of course is set to the full intrinsic size of the drawable. This code is used with the Holder pattern in a ListView where the purpose is to update the drawable without two more Views (LinearLayout and ImageView) to accomplish the same thing. code...
I suppose I can use Drawable.setBounds() and preserve the original aspect ratio with a small function but just wondering if there this a more direct way to do this with the api?
View 3 Replies
View Related
Jan 30, 2010
I wish to have one application that runs in the background, which knows when any of the built-in applications (messaging, contacts, etc) is running. So my questions are: How I should run my application in the background. How my background application can know what the application currently running in the foreground is.
View 4 Replies
View Related
Sep 6, 2010
Key Events that occurred in the virtual keyboard can be passed to the hardware, andriod OS or high-level focus view? As with a physical keyboard.
The dpad right event using Bluetooth devices, then it takes my keyboard service would like to pass on Android system or highest focus view(ex. system dialog, menu...etc). but I don't know how.
View 3 Replies
View Related
Mar 11, 2010
I have an application where I navigate from Activity A to Activity B and back to A and then B. I want to resume the activity B (which has a Bundle passed to it ) from Activity A. The documentation says that OnSaveInstance() is called only when the activity is killed, so how do i use OnPause which does not have the Bundle to resume the activity B.
View 13 Replies
View Related
May 30, 2010
I have a service that regularly queries a web server for new messages. The service stores the new messages in an arrayList. These messages are implemented using a custom class, storing all kinds of metadata (strings and longs).
An activity then connects to this service to retrieve those messages and display them to the user.
I have an .aidl file that describes the interface that the service exposes.
CODE:..........
The Message class extends the Parcelable class which should allow for the IPC transfer.
The problem is this: Eclipse gives me an error saying that the type of List<Message> is unknown. Any imports are marked as invalid.
View 3 Replies
View Related
Jan 20, 2010
I have an activity defined as:
CODE:...................
View 3 Replies
View Related
Sep 1, 2010
While doing normal day-to-day Android development, is it safe to assume that hook methods called by the system will not pass in invalid references (ex.: null), or should I always be double-checking what arguments get passed in?For example, can the method onOptionsItemSelected(MenuItem) ever have a null MenuItem reference passed into it?The reason I ask is because I was working on the Notepad 1 tutorial,I started wondering if I should be testing if item is null before making a getItemId() method call on it, or just trust the system to not ever pass me a null?I don't want to make my code slower by doing null checks when I shouldn't be worried about that happening, etc.
View 1 Replies
View Related
Dec 9, 2012
I am trying to build AOSP for my Huawei U8836D, so I am making my own device tree. How do I determine which files in the stock ROM are proprietary, so I can define them in extract-files.sh?
View 1 Replies
View Related
Jul 10, 2010
Recently tried to download Team Chaos Red Rum 1.3 on my rooted moto droid from Rom manager, after 15 min of waiting for it to boot up (freezes on motorola symbol) i battery pulled... now every time I boot it freezes in the same spot.. how do i fix? prior to boot up freezing i was runing BB 0.4 and chevy kernal @1.2 ghz
View 5 Replies
View Related
Feb 10, 2013
I've tried wiping app data, I won't get passed the loading screen, I've also tried un installing and reinstalling.
View 3 Replies
View Related