android-intent

Starting custom PreferenceActivity INSIDE another PreferenceActivity

淺唱寂寞╮ 提交于 2019-12-24 00:33:54
问题 Inside my Configuration activity i need to create a preference screen with a fixed View at the top showing a preview of content configured in the page. I don't want to change the main preference screen (i have already a separate activity for that) i want a different layout for a "nested" preferencescreen. What i've tried is specifying an Intent inside the preference screen however when i click on this options nothing happens and activity goes into timeout... Activity is correctly configured

Android - 2 Activities active at the same time

…衆ロ難τιáo~ 提交于 2019-12-24 00:32:17
问题 I have a GameActivity. I also have a transparent ChatActivity running on top if the user presses the Chat options from the Menu (onOptionsItemSelected). The problem is, when a player starts the ChatActivity before I start the game, an odd behavior occurs and the game won't start. Is there any way I can keep GameActivity active while ChatActivity is visible? I fired up the ChatActivity using the normal way: startActivity(new Intent(GameActivity.this, ChatActivity.class)); Thanks for your help.

Android catch a custom schema link inside a broadcast receiver

对着背影说爱祢 提交于 2019-12-24 00:25:38
问题 I am currently doing a custom scheme intent-filter to open my own app from the browser. Is it possible to instead opening an activity to launch a broadcast receiver. My current code for the activity broadcast receiver is like this: <action android:name="android.intent.action.VIEW" > </action> <category android:name="android.intent.category.DEFAULT" > </category> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="shortener.com" android:scheme="shortener" > </data

android.net.wifi.STATE_CHANGE not broadcasting when wifi get enabled and WifiManager.EXTRA_WIFI_STATE not available

老子叫甜甜 提交于 2019-12-24 00:23:11
问题 Manifest: <receiver android:name=".triggers.WifiTrigger"> <intent-filter> <action android:name="android.net.wifi.STATE_CHANGE" /> </intent-filter> </receiver> Permissions : <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android

Sending data from a second activity to the first one doesn't work Android

我是研究僧i 提交于 2019-12-23 23:57:51
问题 I am currently working on an app that allows you to make a list of notes: The list is viewable in the first activity The new note button leads to a second activity with edit text and a few text formatting buttons ( Bold, Italic, bigger text, smaller) The app allows you on long clicks to either edit or delete the notes in the list. The problem is when I send data from one activity to another I get this error on the logs: java.lang.NullPointerException: Attempt to invoke virtual method 'java

Outgoing call don't start

我们两清 提交于 2019-12-23 23:40:02
问题 I'm writing an application that: Intercepts an outgoing call Shows a dialog asking whether the call is "personal" or "business" ("Aziendale" in italian) If "personal" , makes the call with the given number If "business" , prepends a suffix to the number (for example 4888 - just temporarily in my code) The point is: as I don't know how to make the call wait for the user's choice, I: Close the incoming call with setResultData(null) Show an alert dialog After user press one button make the call

Cannot get camera preview (call camera) , HTC Thunderbolt

╄→гoц情女王★ 提交于 2019-12-23 23:35:51
问题 I am new to android app development so please any answers would be great with code examples. My problem is this, I have to develop a camera app that streams mjpeg to a server. Now I have successfully created the app for my Motorola Atrix and that works great. My problem is after I signed and exported that app and installed it on an HTC Thunderbolt for additional device testing, I found that it freezes when I try to call for the camera and the app crashes. Since then I have tried every example

Android PDF closes immediately after opening from Internal storage

那年仲夏 提交于 2019-12-23 23:08:23
问题 Im trying to access a pdf file after downloading it from the server and storing it in internal storage. The problem is after successfully downloading the file it opens for a split second then closes immediately. Please can someone tell me whats the proper way to do it. Thank you in advance. Here's my code for downloading my pdf file: File file = new File(getFilesDir(),"pdfFolder"); if(!file.isDirectory()) file.mkdirs(); File outputFile = new File(file, "samples.pdf"); //URLConnection.... /

I want To share Multiple Picture With Single Caption

元气小坏坏 提交于 2019-12-23 23:04:32
问题 I want to share multiple picture with single caption which is shown on one image not on all of them. But caption will show on every pic which is shared at one time. Here is my code private void pic_with_data() { Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.setPackage("com.whatsapp"); shareIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUriArray); shareIntent.putExtra(Intent.EXTRA_TEXT, "Download this App"); shareIntent.setType("text

addProximityAlert works initially

梦想与她 提交于 2019-12-23 22:52:45
问题 I create a number of ProximityAlerts. It seems only the first works and sometime the second. They also seem to expire. I call this method to create a ProximityAlert: public boolean addProximityAlert(int id) { locationManager.addProximityAlert( latitude, longitude, POINT_RADIUS, PROX_ALERT_EXPIRATION, getPendingIntent(id) ); registerReceiver(new ProximityIntentReceiver(), getIntentFilter(id)); return true; } private PendingIntent getPendingIntent(int id) { Intent intent = new Intent(PROX_ALERT