[android-developers] WiFi Direct connections drop during Bluetooth scan
Hello, I made an application (for work, not for public use) that constantly runs a bluetooth scan to detect any nearby devices. The next phase of the application was to connect a few android devices together so that could share the data they receive, to do this we purchased 3 Samsung Tabs to connect them via WiFi Direct. The problem is the WiFi Direct connections ALWAYS drop when my application is running (specifically running the bluetooth scan). When I do not run the bluetooth scan the WiFi Direct connections have not disconnected. Does anyone have any information that could help me here? Am I just out of luck and a bluetooth scan will always cause a WiFi Direct disconnect? Thank you, Matt. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: WiFi Direct connections drop during Bluetooth scan
Thank you for the response. A constant bluetooth scan is necessary, that is what the application is designed to do - constantly detect nearby bluetooth devices. If your concern is battery drain well we have purchased numerous external power packs which will be able to power this for days. If there is another concern I am not aware with a constant scan please do share. A single scan does not cause a drop, no. The application I designed calls startDiscovery() every time the discovery is finished (unless manually stopped) to keep it constant. To verify my suspicion that bluetooth discovery was causing the drops I connected the devices via WiFi Direct, navigated to Android's bluetooth settings on the device and manually tapped Scan every time it finished. Sure enough one of the connections dropped off after about 8 consecutive scans. I am using a Samsung Galaxy Tab 2 10.1 as the WiFi Direct group owner, and 2 Samsung Galaxy Tab 2 7.0 tabs which should send data to the group owner. The 7.0 devices are running the scans. On Tuesday, February 26, 2013 11:47:58 AM UTC-5, Matt M wrote: Hello, I made an application (for work, not for public use) that constantly runs a bluetooth scan to detect any nearby devices. The next phase of the application was to connect a few android devices together so that could share the data they receive, to do this we purchased 3 Samsung Tabs to connect them via WiFi Direct. The problem is the WiFi Direct connections ALWAYS drop when my application is running (specifically running the bluetooth scan). When I do not run the bluetooth scan the WiFi Direct connections have not disconnected. Does anyone have any information that could help me here? Am I just out of luck and a bluetooth scan will always cause a WiFi Direct disconnect? Thank you, Matt. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Setting Background Image of View with onDraw Creates Finger Lag
Hello, I have a finger painting portion in my app that I built off of FingerPaint.java http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/FingerPaint.html I am trying to set a background image using setBackgroundDrawable() but upon doing so there is a significant amount of lag created when painting (the tip of the paint lags behind the user's finger). I'm calling view.setBackgroundDrawable in onCreate(). Any ideas on a fix? Any help greatly appreciated! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] 'E-Mail Developer' button creating a lot of spam?
Hello, I added an E-Mail Developer button to my application and ever since I get random e-mails throughout the day that either have an empty message body or just one or two words in a different language (looks like Russian or something similar, sometimes an Asian language). Occasionally I get one that just reads Good. At first I thought it was just a user complimenting me, but its happened to much to be a coincidence. For what its worth, just last night I updated to version X and already the e-mails I receive are from that version, barely 24 hours old. I'm worried this means my app has been hacked and decompiled.. but thinking about it more logically I'm not getting just extra general spam as if my e-mail had been 'stolen' and spread around, it's all originating from the E-mail Developer button. Plus, my app is barely equivalent in status to Angry Birds so I cant imagine it being at the top of a hackers To Do list. Is anyone else having this problem? If not, and you have an contact button installed, how did you set it up? Maybe I went about it the wrong way.. Thank you for your help! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Amazon Rejected My App - Missing application identifier?
Hello, Amazon has responded after 2 weeks saying they reject my application because it force closed. The log (according to them) reads: E/ BlacklistDecisionPoint(26780): Missing application identifier. If it means anything they apparently used an HTC Incredible 2.2 Has anyone heard of this before?? I cannot reproduce it with the steps they gave, none of my numerous users have reported it, and it is not in the Google Developer Console error logs. What the hell! I am going to just send the same thing back hoping it was just some strange fluke, but until then if anyone has information on this it would be greatly appreciated! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating 9-patch Images on Device
Nick, Thank you for your thoughts. I hoped it would be that easy as well, however according to this discussion: https://groups.google.com/group/android-developers/browse_thread/thre... Romain Guy states There's a compilation phase to embed extra information inside the PNG but it happens in aapt when the apk is built.. Since I need to create 9patch images after apk packaging, it looks like I need to replicate what the aapt does. Unfortunately this is quite beyond my knowledge so any information anyone can offer would be greatly appreciated! Matt. On Apr 3, 4:54 am, Nicholas Johnson metthejohn...@gmail.com wrote: It shouldn't be too difficult. If you have a byte stream of the bitmap, then just set the pixels on the first/last row/col to black where you want to stretch the image and set the other pixels to zero. Then you could remain the image *.9.png and then load it as a normal 9 patch drawable resource. There's more info on the 9-patch at this linkhttp://developer.android.com/guide/topics/graphics/2d-graphics.html#n..., so you can know which pixels you want to set as black and which to keep clear. Here's the big caveat: I've never done this programmatically, but I have drawn all my 9-patch images by hand in the GIMP setting the 9 patch pixels myself, so I don't think it'd be too hard to do in code. Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating 9-patch Images on Device
Sorry, this discussion: https://groups.google.com/group/android-developers/browse_thread/thread/22f402ccedba9533 Also, this link is the ResourceTypes.h file that describes (sort of) how to manage the byte[] chunk. I've studied it I just do not know what to return exactly. http://www.netmite.com/android/mydroid/frameworks/base/include/utils/ResourceTypes.h -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating 9-patch Images on Device
I was looking at 9patch because the images are being displayed on a home screen widget. They are designed for portrait display, so when orientation is changed to landscape the widget looks a bit distorted. If 9patch on device is possible that seems like the most efficient method, however if there is a way to detect orientation change in a home screen widget I would certainly accept that as the next best thing. Although I have yet to find how to detect orientation in an AppWidgetProvider. Matt. On Apr 3, 6:56 pm, Nicholas Johnson metthejohn...@gmail.com wrote: Ah, ok, I hadn't read that at all. By the way, what are you doing with the image that you need to make it a 9 patch? Perhaps you can use a matrix to scale it however you need before displaying it? Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating 9-patch Images on Device
skink, Thank you for your input. I have not considered Drawable, but probably because I do not know much about them :) What do they bring to the table to appropriately stretch an image like a 9patch? Thank you! Matt. On Apr 4, 1:23 am, skink psk...@gmail.com wrote: On Apr 4, 4:44 am, Matt M matthew.mag...@gmail.com wrote: I was looking at 9patch because the images are being displayed on a home screen widget. They are designed for portrait display, so when orientation is changed to landscape the widget looks a bit distorted. If 9patch on device is possible that seems like the most efficient method, however if there is a way to detect orientation change in a home screen widget I would certainly accept that as the next best thing. Although I have yet to find how to detect orientation in an AppWidgetProvider. Matt. Matt, Instead of creating 9-patch did you consider creating your own custom Drawable? pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Creating 9-patch Images on Device
Hello, I am trying to create 9-patch images using bitmaps on the device. I am aware of the draw9patch tool and I know how to use it however the images in question are customized by the user thus using the tool and adding images as resources is out of the question. My research has led me to this discussion: http://groups.google.com/group/android-developers/browse_frm/thread/4fb0243754ce32/8c9663d62ed7be91?q=NinePatchDrawable+constructor#8c9663d62ed7be91 An Android Engineer indicated the following: The byte[] is the raw data of the PNG 9-patch extension chunk that we defined for android, which aapt generates; you'll have to build that all yourself, and look at the ResourceTypes.h header file for a description of its contents. Is anyone aware of any examples on how to accomplish such a thing or have any tips whatsoever on how to approach this? All comments are greatly appreciated! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Amazon Appmarket is now open!
To those who have submitted apps to Amazon how long did it take between submitting and approval? Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Cursor management issue with Honeycomb
I had the same error as well. startManagingCursor() was used in Activity A which launched Activity B. When Activity B was saved and Activity A returned to the forefront the app force closed. Calling stopManagingCursor() in Activity A solved it. Obviously my fault for not reading enough, but when I was learning the Android SDK and reading the dev guides I remember learning you should use startManagingCursor() so that the Cursor will be managed by the OS, implying nothing else was needed. Interesting that is not so! Matt. On Mar 3, 10:09 am, al achim.leub...@googlemail.com wrote: I saw the same error. In my case, I told the activity to manage acursor (Activity.startManagingCursor(cursor) and later on replaced thecursor with a new one due to changes in my filter settings without stopping themanagement of the previouscursor(i.e. without calling Activity.stopManagingCursor(cursor)). performRestart() then tried to requery the old and already closedcursor. Maybe, you forgot stopManagingCursor() too? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Undo Feature in Drawing App - Need best methodology, not looking for code
Hello, My application includes a drawing feature and I would like the add the ability to undo. The undo feature currently in place simply loads the bitmap from the last saved file, so no matter how many changes they make to their drawing undo will revert it back to the way it was before any changes were made. What I want to do now is make it more like the undo feature we are used to in modern applications, so that it does not go back to the way the file was when we first opened it, rather it goes back in various steps during our editing (which can be quite numerous). My idea is to save the current bitmap in a linked list after every occurrence of finger down, finger up. Thus every time the user lifts their finger from the screen the bitmap will be added to the linked list. Then of course when undo is selected the bitmap at the top of the stack will be loaded. The only problem is if the user makes 20, 30, 40+ changes to their drawing that is a lot of bitmaps to keep references to, am I right? I see out of memory errors coming. Any ideas for alternatives? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to setImageViewUri in Widget using getFileStreamPath()?
Hello, This is really baffling. In an AppWidgetProvider I am trying to setImageViewUri using this Uri: Uri.fromFile(getFileStreamPath(name)) I know the file exists in internal storage because I've tried File.exists(), and I also successfully tried: Bitmap b = BitmapFactory.decodeFile(getFileStreamPath(path).getAbsolutePath()); views.setImageViewBitmap(id, b); I need to do this with 3 images of varying size so converting to a Bitmap is out of the question (I get a Failed Binder Transaction regularly). Why is it that I can use the same getFileStreamPath to create a bitmap but cannot create the Uri to use in setImageViewUri? (this is all in an AppWidgetProvider) Any help would be greatly appreciated! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to setImageViewUri in Widget using getFileStreamPath()?
Thank you for your replay Kostya. The solution I chose was to change the privacy during saving. Changed openFileOutput(file, Context.MODE_PRIVATE) to openFileOutput(file, Context.MODE_WORLD_READABLE) Thank you. Matt. On Mar 12, 2:00 pm, Kostya Vasilyev kmans...@gmail.com wrote: Matt, I'm assuming your widget is running inside the home screen application (Launcher2 by default). The launcher is a separate application from your own, and therefore cannot access files stored in your application's private data storage directory. Create these image files someplace where other applications (including the launcher) can read them. -- Kostya 12.03.2011 21:44, Matt M пишет: Hello, This is really baffling. In an AppWidgetProvider I am trying to setImageViewUri using this Uri: Uri.fromFile(getFileStreamPath(name)) I know the file exists in internal storage because I've tried File.exists(), and I also successfully tried: Bitmap b = BitmapFactory.decodeFile(getFileStreamPath(path).getAbsolutePath()); views.setImageViewBitmap(id, b); I need to do this with 3 images of varying size so converting to a Bitmap is out of the question (I get a Failed Binder Transaction regularly). Why is it that I can use the same getFileStreamPath to create a bitmap but cannot create the Uri to use in setImageViewUri? (this is all in an AppWidgetProvider) Any help would be greatly appreciated! Matt. -- Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: TextView adjusts, ImageView stays static when keyboard pops up - How To?
Any ideas?? On Feb 23, 1:04 am, Matt M matthew.mag...@gmail.com wrote: Hello, I have a TextView on top of an ImageView. When the keyboard pops up I want the TextView to shrink and adjust to the keyboard popping up (like normal) but I want the ImageView to stay static, thus I do not want the image to shrink. I tried using android:windowSoftInputMode=statePan manifest but this makes BOTH views static. I need the TextView dynamic, the ImageView static. Any help would be greatly appreciated! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] TextView adjusts, ImageView stays static when keyboard pops up - How To?
Hello, I have a TextView on top of an ImageView. When the keyboard pops up I want the TextView to shrink and adjust to the keyboard popping up (like normal) but I want the ImageView to stay static, thus I do not want the image to shrink. I tried using android:windowSoftInputMode=statePan manifest but this makes BOTH views static. I need the TextView dynamic, the ImageView static. Any help would be greatly appreciated! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Hide Background ImageView from above Bitmap/Canvas
Hello, I have an ImageView whose background is set to a drawable using setBackgroundDrawable. On top of this ImageView is a custom view which utilizes a Bitmap to allow the user to draw/paint. Currently the Bitmap captures the background drawable so that every time the onDraw method is called (which is frequently) the Bitmap with the background image drawn onto it are constantly redrawn on the screen thus creating a lot of lag (the tail of the paint is slow following the user's finger). protected void onDraw(Canvas canvas) { canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint); canvas.drawPath(mPath, mPaint); } So what I am trying to do is hide the ImageView from the Bitmap so that it does not get captured. I want the ImageView to display so the user sees it but not be drawn onto the Bitmap. How can I hide the background drawable from the Bitmap? I tried ImageView.setWillNotCacheDrawing(true) and ImageView.setWillNotDraw(true) to no avail. Any help would be greatly appreciated! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Actual Galaxy Tab Displays Different Than Emulator - 5x5 Widgets?
Hello, I created a Galaxy Tab emulator using these instructions: http://innovator.samsungmobile.com/galaxyTab.do When I install my 4x2 widget on the emulator it displays like it does on a phone (full width, half the height). However I went to try it out on an actual device in Best Buy and there it displayed as if there is room for a 5th row and column. First of all, why is there this discrepancy? Second, how would I create a 5x5 widget? Thank you, Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Set Default Chooser when Selecting Image?
Hello, In my application the user selects an image. When the ACTION_GET_CONTENT intent is launched it displays the dialog to select one of the available image viewers installed on the device. However I need the built in Gallery app to be chosen because upon selecting an image it launches the screen to crop the image (same thing that comes up when choosing the home screen wallpaper) which only the Gallery chooser offers. Is it possible to skip this chooser dialog and launch the Gallery automatically? Or at least remove the other options from the list so only Gallery displays? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Getting Images From Gallery - Not All Work?
Any help truly appreciated! On Sep 24, 12:27 am, Matt M matthew.mag...@gmail.com wrote: Hello, I am simply trying to get the path of an image that the user selects and then convert it into a bitmap. The problem is, only some of the images in the gallery work when selected (by work I mean they are found to be a file that exists), while the others claim the file does not exist (even though the image is showing up in the gallery?). Even more strange is that this doesn't seem to be consistent, an image that was at one point considered to exist now claims to be nonexistent. My code is below: -The Intent- Intent intent = new Intent(Intent.ACTION_PICK); intent.setType(image/*); startActivityForResult(intent, GALLERY_ACTIVITY); -onActivityForResult- Uri uri = intent.getData(); String [] proj={MediaStore.Images.Media.DATA}; Cursor cursor = managedQuery(uri,proj,null,null,null); int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor.moveToFirst(); BitmapFactory.Options opts = new BitmapFactory.Options(); opts.inSampleSize = 2; Bitmap b = BitmapFactory.decodeFile(cursor.getString(column_index),opts); Any ideas on this will be greatly appreciated, thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Getting Images From Gallery - Not All Work?
Hello, I am simply trying to get the path of an image that the user selects and then convert it into a bitmap. The problem is, only some of the images in the gallery work when selected (by work I mean they are found to be a file that exists), while the others claim the file does not exist (even though the image is showing up in the gallery?). Even more strange is that this doesn't seem to be consistent, an image that was at one point considered to exist now claims to be nonexistent. My code is below: -The Intent- Intent intent = new Intent(Intent.ACTION_PICK); intent.setType(image/*); startActivityForResult(intent, GALLERY_ACTIVITY); -onActivityForResult- Uri uri = intent.getData(); String [] proj={MediaStore.Images.Media.DATA}; Cursor cursor = managedQuery(uri,proj,null,null,null); int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); cursor.moveToFirst(); BitmapFactory.Options opts = new BitmapFactory.Options(); opts.inSampleSize = 2; Bitmap b = BitmapFactory.decodeFile(cursor.getString(column_index),opts); Any ideas on this will be greatly appreciated, thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Getting Thread ID/Phone# of an Open SMS Message?
Hello, I am using RunningTaskInfo.topActivity.getClassName() to determine the class name of the activity being viewed by the user. If the top activity is an sms message (the user is texting) then I want to determine either the thread id of the open message or the contact name/ number, either will work! I am able to determine if a message is open by comparing the class name.. RunningTaskInfo.topActivity.getClassName().equals(com.android.mms.ui.ComposeMessageActivity) ..which returns true/false. When it is true I need to get the above information from this compose message. Any ideas on how I can get this kind of information from an Android OS activity (an sms message)? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Getting Thread ID/Phone# of an Open SMS Message?
Understood. Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to Send Phone to Phone Alerts in Background?
Hello, In my app I am giving the option for users to share information with other users of my app. After two users decide to share, every time one of the sharers updates the app I need an alert/notification sent to the phone of the other user so that the app updates automatically with the new information. So basically I am looking for something along the lines of hidden text messages, which when received the app will automatically update. Can anyone point me in the direction of what to use? What Android has to offer to accomplish this? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: setContentView of a Custom View
(); break; case MotionEvent.ACTION_UP: touch_up(); invalidate(); break; } return true; } public void clear() { mBitmap = Bitmap.createBitmap(320, 480, Bitmap.Config.ARGB_); mCanvas = new Canvas(mBitmap); invalidate(); } } END OF PaintView CONTINUE Paint/ private void save() { Bitmap b = Bitmap.createBitmap( view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_); Canvas c = new Canvas( b ); view.draw( c ); FileOutputStream fos = null; try { fos = new FileOutputStream( /sdcard/image + .jpg ); if ( fos != null ) { b.compress(Bitmap.CompressFormat.PNG, 100, fos ); fos.close(); } } catch( Exception e ) { Log.e(Save View, Exception: + e.toString() ); } } public void colorChanged(int color) { mPaint.setColor(color); } } ///paint_layout.xml/// ?xml version=1.0 encoding=utf-8? FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/paint android:layout_width=fill_parent android:layout_height=fill_parent View class=com.app.name.Paint$PaintView android:id=@+id/PaintView android:layout_width=fill_parent android:layout_height=fill_parent / Button android:id=@+id/closePaint android:text=Close android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=left|bottom / Button android:id=@+id/togglePaint android:text=Toggle android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=right|bottom / /FrameLayout This is my current setup. Currently it just loads a black screen with the buttons, no painting working. But I know the paint code works, it stopped working when I tried customizing the view with paint_layout.xml On Jun 18, 1:21 am, Nithin nithin.war...@gmail.com wrote: -it does not work properly. means what. What error are you getting ?. Do you override all the constructors. Nithin On Jun 17, 9:54 pm, Matt M matthew.mag...@gmail.com wrote: Hello, My current painting activity is built off of FingerPaint.java from the API Demos. In my xml I declared the custom view, see below. When I setContentView(view); everything works fine, but the problem is when I setContentView(paint_layout.xml) it does not work properly. ///PaintActivity/// public class Paint extends PaintActivity implements ColorPickerDialog.OnColorChangedListener { private Paint mPaint; private PaintView view; �...@override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); view = new PaintView(this); setContentView(view); //Set mPaint code } public class PaintView extends View { //PaintView code } //Paint code } ///paint_layout.xml/// FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/paint android:layout_width=fill_parent android:layout_height=fill_parent com.myname.appname.PaintView android:id=@+id/PaintView android:layout_width=fill_parent android:layout_height=fill_parent / !-- other buttons and text -- /FrameLayout Can anyone inform me of why exactly? Am I missing an attribute for the custom layout in the xml? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] setContentView of a Custom View
Hello, My current painting activity is built off of FingerPaint.java from the API Demos. In my xml I declared the custom view, see below. When I setContentView(view); everything works fine, but the problem is when I setContentView(paint_layout.xml) it does not work properly. ///PaintActivity/// public class Paint extends PaintActivity implements ColorPickerDialog.OnColorChangedListener { private Paint mPaint; private PaintView view; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); view = new PaintView(this); setContentView(view); //Set mPaint code } public class PaintView extends View { //PaintView code } //Paint code } ///paint_layout.xml/// FrameLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/paint android:layout_width=fill_parent android:layout_height=fill_parent com.myname.appname.PaintView android:id=@+id/PaintView android:layout_width=fill_parent android:layout_height=fill_parent / !-- other buttons and text -- /FrameLayout Can anyone inform me of why exactly? Am I missing an attribute for the custom layout in the xml? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Redrawing Widget When Changing Orientation
I've discovered the method call that causes the problem but I still don't understand why.. In an activity, after saving and exiting I make a static method call MyAppWidget.forceUpdate(this, text); Below is the method which updates the text of the widget public static void forceUpdate(Context context, String note) { if (context != null) { ComponentName thisWidget = new ComponentName(context,WhiteboardWidget.class); AppWidgetManager manager = AppWidgetManager.getInstance(context); RemoteViews views = new RemoteViews(whiteboard,R.layout.widget_layout); views.setTextViewText(R.id.boardNote, note); manager.updateAppWidget(thisWidget, views); } } Any ideas now?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Redrawing Widget When Changing Orientation
Hello, I have a widget set up and it displays properly in both portrait and landscape when added to each. But when I change orientation it has the problem Problem Loading Widget. I delete this, re-add the widget, and it displays correctly. Thus, my widget can support both portrait and landscape but it doesn't survive an orientation switch. What am I missing? Do I need to redraw the widget when orientation is changed? Doesn't it do this automatically? Do I need to call onUpdate() somehow? Thank you! Matt. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en