intent

Android: how to get the intent received by a service?

Hi I'm starting a service with an intent where I put extra information. How can I get the intent in the code of my service? There isn't a function like getIntent().getExtras() in service like in activity. Thanks. ...

Launch activity at certain time

Hi, I'm new to Android development, so I might be missing something obvious. I want to launch an activity when the user's phone clock hits a specified time (similar to an alarm). However, I'm not sure how I would go about doing this as constant polling of the clock seems inefficient and a waste of resources. Do I need to capture broadc...

Launching external application from my app

Hi, I would like to launch an app the user selects from within my application. However, I'm not sure how I'd go about doing this. I've tried this: Intent intent = new Intent(); intent.setAction(Contacts.Intents.SHOW_OR_CREATE_CONTACT); startActivity(intent); But this seems to throw an error and force close my application. I also tri...

Android intentoptions for SMS standard app and EMail standard app

Is it possible to add a option to the sms and email app of android? I want to add a option who call my activity and send me the sms text or email text. Is it possible? ...

Using Intent from non-activity class

I have three classes one main-activity(named MainMap), one non-activity class(named MyItemizedOverlay), and one activity class(named AudioStream). I want to start AudioStream activity from non-activity class but i don't know how to. i tried this is in third class(called MyItemizedOverlay): Intent myIntentA = new I...

Catching market search intents?

I'm trying to catch an Android Market search intent. That's the way you launch Android Market and search for an app by package name: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:com.google.somepackage"))); Now, here's the intent filter for one of my activities: <intent-filter> <action android:n...

Retaining android app state using alwaysRetainTaskState and lauchMode

In my Android app, I have a main activity that serves as an entry point to my application, which is configured in my manifest file like this : <activity android:name=".Main" android:label="@string/app_name" android:screenOrientation="portrait" android:alwaysRetainTaskState="true" ...

logging to a database when user clicks on a widget

I have a widget that displays an analog clock. What I would like is for the the widget to write to a database the time when a user clicks on the widget. I've already got the databaseHelper class and have an Activity that displays a screen showing the current date and time and writes the time to a database. I followed the tutorial here: ...

Android Intent for Twitter application

Hey, Is it possible to show a list of applications (with intent.createChooser) that only show me my twitter apps on my phone (so htc peep (htc hero) or twitdroid). I have tried it with intent.settype("application/twitter") but it doesnt find any apps for twitter and only shows my mail apps. Thank you, Wouter ...

Is there any way to put extras to Intent from preferences ?

Hi i'm launching activity from preferences screen. Activity is shared among three preferences. I wonder if i can set extras for this activity in xml <Preference android:key="action_1" android:title="@string/action_1_title" > <intent android:action="com.package.SHAREDACTION" > </intent> </Preference> i wond...

How to select and crop an image in android?

Hey, I am currently working on a live wallpaper and I allow the user to select an image which will go behind my effects. Currently I have: Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); i.putExtra("crop", "true"); startActivityForResult(i, 1); And sli...

how to Open new screen in Android?

Dear friends, i am new to android and i have created a login page after verifing login i get results true or false on the bases of user authentication now my goal is to show another screen on successful authentication with some new textboxes and button i mean new layout how to achieve this??? any help would be appriciated. ...

Code/Function/Library to intent/format/prettify JavaScript/QtScript code for readablity within the application?

Greetings, in one of my applications I provide a simple code editor based on a QTextEdit widget and the QSyntaxHighlighter. I was wondering if there is function, library or generally a way to allow the user to have his/her code re-formatted and intented within the application? Websites like this allow you to re-format and intent JavaSc...

Android persistent state with global variables when system kills activities

In order to persist state in my android app, so that the user will return to the activity they left off at, i've set the very useful flag alwaysRetainTaskState in my manifest: <activity android:name=".Main" android:label="@string/app_name" android:alwaysRetainTaskState="true"> <intent-filter> ...

Android Camera Intent Geo-Tagging

We are utilizing the Intent.ACTION_IMAGE_CAPTURE for taking a new picture from within our app. However, we would like to force geo-tagging of the pictures. Is there a way to set the intent to do this or does it rely solely on the default Camera app's setting to "Store Location"? (Also, it would be nice if this worked for the ACTION_VIDE...

Calling Intent.getStringExtra() throws StackOverflowError periodically

I have an android application that I am supporting and after calling one of the activities numerous time, it throws a stackoverflowerror when trying to get the extras from the intent. Here is the the stack trace from when it crashes. Any ideas as to why after calling the activity at least 4 times the next time throws StackOverflowError ...

Android: Serializable Intent

I have an object that has (among other things) a list of Intents. I want to pass this object as an extra to an Intent. However, the Intent class is not serializable, it is just "Parcelable". I assume that Parcelable is the android version of Serializable, but I'd rather not have to write my own serialization code for my class, and P...

How to send an object from one Android Activity to another with Intent.putExtra?

Dear friends, Can anyone guide me as to how I can pass an object of a custom type from one Activity to another with the putExtra() method of Intent??? Any help would be appreciated. ...

Android - Sending data from a class to an activity?

Hi all, Have a question about sending data between classes and activities. I currently have a class that monitors outgoing class and gets the number of an outgoing call. I instantiate this class in my main Activity and run its method that retrieves the number. However I now have another Activity that I want to pass the number to. I...

In the Gallery from Intent.ACTION_PICK, can I override the longClick?

In my app i let the user select one image from the media gallery. To do this i use the Intent.ACTION_PICK. Like Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); startActivityForResult(intent, IMAGE_PICK); The app works mostly fine, the users can select an image and the uri correctly. The matter is in ...