[android-developers] re: for help
Hi All, i can create the text view dynamically using code can any help me in deleting the text view programatically using java code in android please help me, Thanks Naveen. -- 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] working on certificates
Hi all, I am working on parsing the xml feed . My xml file is in secure server for parsin this secure xml feed i need to add certificates i have added the certificates to my activty but i am unable to get response from xml feed but getting ssl error following is my code String shopapi = https://api.shopvisible.com/ProductService.asmx/CreateBasicProduct?ClientName=IncipioBespokeguid=fa63b21c-115a-e011-96ff-0026b95352bbInboundProductXML=%3CProduct%3E%3CProductPartNo%3EBCC-IPH-5449%3C/ProductPartNo%3E%3CProductUPC%3Ebespoke%3C/ProductUPC%3E%3CProductCode%3Ebespoke%20Custom%20Case%3C/ProductCode%3E%3CName%3ECustomized%20Case%3C/Name%3E%3CBrand%3E23%3C/Brand%3E%3CSubCategory%3E1%3C/SubCategory%3E%3CImageName%3Ehttp://ncpo.cc/android/bespokecaseimages/6409072.jpg%3C/ImageName%3E%3CPrice%3E29.99%3C/Price%3E%3COrderable%3Etrue%3C/Orderable%3E%3CQuantity%3E50%3C/Quantity%3E%3CWeight%3E0.0%3C/Weight%3E%3CSubWeight%3E3%3C/SubWeight%3E%3CCustomText%3E%3C/CustomText%3E%3CXtra2%3E%3C/Xtra2%3E%3C/Product%3E ; URL sourceUrl = new URL(shopapi); /** * Create handler to handle XML Tags ( extends DefaultHandler ) */ try { XmlhandlerForShopapi myXMLHandler = new XmlhandlerForShopapi(); Log.d(sdfgf, shopapi 1 + shopapi); xr.setContentHandler(myXMLHandler); Log.d(sdfgf, shopapi 2 + shopapi); xr.parse(new InputSource(sourceUrl.openStream())); Log.d(sdfgf, shopapi3 + shopapi); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ParserConfigurationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); } please anyone help me Thanks Naveen -- 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] working on rss parsing
Hi all, I am working on Rss feed parsing I am able to parse rss feed but i am getting some problem in reading content:encoded tag which contains lot of data only some part of data only it is not reading full data. following is my code: public class EventRssHandler extends DefaultHandler { public static ArrayListString mylist_content = new ArrayListString(); EventRssFeed _feed; String _lastElementName = ; boolean bFoundChannel = false; final int RSS_CONTENT = 1; int depth = 0; int currentstate = 0; public EventRssHandler() { } EventRssFeed getEventRssFeed() { return _feed; } public void startDocument() throws SAXException { _feed = new EventRssFeed(); } public void endDocument() throws SAXException { } public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { depth++; if (localName.equals(channel)) { currentstate = 0; return; } if (localName.equals(item)) { return; } if (localName.equalsIgnoreCase(encoded)) { currentstate = RSS_CONTENT; return; } currentstate = 0; } public void endElement(String namespaceURI, String localName, String qName) throws SAXException { depth--; if (localName.equals(item)) { return; } } public void characters(char ch[], int start, int length) { String theString = new String(ch, start, length); switch (currentstate) { case RSS_CONTENT: mylist_content.add(theString); currentstate = 0; break; default: mylist.add(listItems); return; } } Please help me Thanks Naveen. -- 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] help required in rss parsing in android
Hi All, i am in rss parsing in android. my rss feed is as follows: titleIncipio’s Weekly Press Recap/title link https://blog.myincipio.com/news/incipios-weekly-press-recap-5.html/link comments https://blog.myincipio.com/news/incipios-weekly-press-recap-5.html#comments /comments pubDateFri, 06 Apr 2012 22:25:10 +/pubDate dc:creatorKim/dc:creator category![CDATA[In The Press]]/category category![CDATA[News]]/category guid isPermaLink=false http://blog.myincipio.com/?p=8791/guid description![CDATA[Happy Friday!Continue reading span class=meta-nav#8594;/span/a]]/description content:encoded![CDATA[pa href= https://blog.myincipio.com/wp-content/uploads/2012/04/Incipio-Weekly-Press-Recap.jpg; rel=shadowbox[sbpost-8791];player=img; title=Incipio-Weekly-Press-Recapimg class=alignnone size-medium wp-image-8847 title=Incipio-Weekly-Press-Recap src= https://blog.myincipio.com/wp-content/uploads/2012/04/Incipio-Weekly-Press-Recap-300x300.jpg; alt=Incipio-Weekly-Press-Recap width=300 height=300 //a/p pHappy Friday! Incipio is all over the media this week for a variety of products from new iPad cases to iPhone 4/4S cases. Browse through the Incipio Reviews from MacWorld, MacTrast, OkayGeek and more#8230;/p pa href= http://www.mactrast.com/2012/03/review-slim-kickstand-for-ipad-by-incipio/; target=_blankIncipio new iPad Slim KICKSTAND Review on MacTrast./a/p ]]/content:encoded Here i need to parse content:encode tag i tried to parse using following code but i can not parse this content:encode if (localName.equalsIgnoreCase(content:encoded)) { currentstate = RSS_CONTENT; Log.d(fddgfdgd, swathi in rss handler RSS_CONTENT + currentstate); return; } please help me Thanks Naveen. -- 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] running javascript
Hi All, I need help on reading the html code after loading javascript in android I am loading the web page in my web view after loading my first webpage it is redirecting to second page in the second page i need to read to the html code after loading the java script code but in my code i am reading html code befor loading the javascript please help me Thanks Swathi -- 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] working on web view
Hi All, I am working on opening the php page in my web view Here my php page is redirecting to another php page when the page is redirecting to another php page the java script in the redirected php are not loading i am using public void onPageFinished(WebView view, String url) method in webcromeclient but still unable to load the java script. Please help me. Thanks Naveen. -- 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 load php scripts
Hi all, I am working on opening web page in web view using web client i need to read the source code of the page i am using web crome client in my web page first page is redirecting the to second page the java script in the first page are loading and redirecting to second page but the java scripts in the second page are not loading. Please help me in solving this.Thanks in advance. Thanks Naveen. -- 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] hi
Hi All I need help on reading the html source of a page in android i am able to load the html link in webview and able to read html source but my problem is while i am reading the html source of my page i am unable to get access token and user id i am unable to find where i am going wrong following is my code please help me public class InstagramAlbumsActivity extends Activity { String url = http://ncpo.cc/test/example.php;; Button login; org.apache.http.HttpResponse response; WebView mWebView; String s; String html = ; String line = null; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.openingwebpage); mWebView = (WebView) findViewById(R.id.webView1); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.clearCache(true); mWebView.setWebChromeClient(new WebChromeClient()); mWebView.setWebViewClient(new HelloWebViewClient()); mWebView.loadUrl(url); } final class HelloWebViewClient extends WebViewClient { @Override public void onPageFinished(WebView view, String url) { String s = mWebView.getUrl(); Log.d(HelloWebViewClient url , s); try { HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(s); response = client.execute(request); java.io.InputStream in = response.getEntity().getContent(); BufferedReader reader = new BufferedReader( new InputStreamReader(in)); StringBuilder str = new StringBuilder(); Log.d(ddfhfghg url , in String Builder + mWebView.getUrl()); while ((line = reader.readLine()) != null) { str.append(line); html = str.toString(); if (html.contains(!DOCTYPE html PUBLIC )) { Log.d(ddfhfghg url , in while + mWebView.getUrl()); Log.d(html in if, html); } else if (html.contains(Popular Media)) { mWebView.loadUrl(url); } else { Log.d(html in the else begining, html); } } Log.d(ddfhfghg url , after while + mWebView.getUrl()); in.close(); } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { // TODO Auto-generated method stub return false; } } } Please help me Thanks Swathi. -- 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
Re: [android-developers] Need help on reading the html source of a page
Hi, as i dont know any thing about php script and java script. in my html code the first page is redirecting to second page i need to read the second page source code in i tried using the code in the link using that i am reading the first page source i amno getting the second page source code so that i am asking to extend some more help following is the code i am trying String url = http://ncpo.cc/test/example.php;; Button login; org.apache.http.HttpResponse response; WebView mWebView; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.openingwebpage); mWebView = (WebView) findViewById(R.id.webView1); Log.d(Calc, gghfhfhf); mWebView.setWebViewClient(new HelloWebViewClient()); Log.d(Calc, gghfhfhf ghgfhhg); mWebView.getSettings().setJavaScriptEnabled(true); Log.d(Calc, gghfhfhfghjghjgjhggkhljjk;kl''); mWebView.clearCache(true); mWebView.setWebChromeClient(new WebChromeClient()); Log.d(Calc, gghfhfhf swathi 1); mWebView.addJavascriptInterface(new HtmlHandler(), HTMLOUT); // mWebView.loadUrl(javascript:window.HTMLOUT.processHTML('head'+document.getElementsByTagName('html')[0].innerHTML+'/head');); mWebView.loadUrl(url); } private class HelloWebViewClient extends WebViewClient { @Override public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub super.onPageFinished(view, url); // mWebView.loadUrl(javascript:window.HTMLOUT.processHTML('head'+document.getElementsByTagName('html')[0].innerHTML+'/head');); } } final class HtmlHandler { public void processHTML(String html) { // process the html as needed by the app Log.d(dgdffghgh, swathi in hyderabad); Get_Webpage obj = new Get_Webpage(url); Log.d(swathi, gghfhfhf swathi loading); String source = obj.get_webpage_source(); Log.d(html loading, source); } } String html = ; String line = null; public class Get_Webpage { public String parsing_url = ; public Get_Webpage(String url_2_get) { parsing_url = url_2_get; } public String get_webpage_source() { try { HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(parsing_url); HttpResponse response = client.execute(request); InputStream in = response.getEntity().getContent(); BufferedReader reader = new BufferedReader( new InputStreamReader(in)); StringBuilder str = new StringBuilder(); while ((line = reader.readLine()) != null) { str.append(line); } in.close(); html = str.toString(); } catch (ClientProtocolException e) { } catch (IOException e) { } return html; } } } On Fri, Mar 16, 2012 at 10:51 AM, Justin Anderson magouyaw...@gmail.comwrote: Hi Mark Murphy, will you please help me in reading html source code Ummm... he already helped you. Follow the link he gave you and try to implement some of the stuff that is recommended in that post. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, Mar 15, 2012 at 10:56 PM, chowdary nani naveenneeli...@gmail.comwrote: Hi Mark Murphy, will you please help me in reading html source code -- 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 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
Re: [android-developers] Need help on reading the html source of a page
Hi Mark Murphy, will you please help me in reading html source code please its important for me for this url I have edited my code in the following way but i am getting same problem will you please check it once my code is as follows public class InstagramAlbumsActivity extends Activity { String url = http://ncpo.cc/test/example.php;; Button login; org.apache.http.HttpResponse response; WebView mWebView; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.openingwebpage); mWebView = (WebView) findViewById(R.id.webView1); Log.d(Calc, gghfhfhf); mWebView.setWebViewClient(new HelloWebViewClient()); Log.d(Calc, gghfhfhf ghgfhhg); mWebView.getSettings().setJavaScriptEnabled(true); Log.d(Calc, gghfhfhfghjghjgjhggkhljjk;kl''); mWebView.clearCache(true); mWebView.setWebChromeClient(new WebChromeClient()); Log.d(Calc, gghfhfhf swathi 1); mWebView.addJavascriptInterface(new HtmlHandler(), HTMLOUT); mWebView.loadUrl(url); } private class HelloWebViewClient extends WebViewClient { @Override public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub super.onPageFinished(view, url); mWebView.loadUrl(javascript:window.HTMLOUT.processHTML('div'+document.getElementsByTagName('html')[0].innerHTML+'/div');); } } final class HtmlHandler { public void processHTML(String html) { // process the html as needed by the app Log.d(dgdffghgh, swathi in hyderabad); Get_Webpage obj = new Get_Webpage(url); Log.d(swathi, gghfhfhf swathi loading); String source = obj.get_webpage_source(); Log.d(html loading, source); } } public class Get_Webpage { public String parsing_url = ; public Get_Webpage(String url_2_get) { parsing_url = url_2_get; } public String get_webpage_source() { HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(parsing_url); HttpResponse response = null; try { response = client.execute(request); } catch (ClientProtocolException e) { } catch (IOException e) { } String html = ; InputStream in = null; try { in = response.getEntity().getContent(); } catch (IllegalStateException e) { } catch (IOException e) { } BufferedReader reader = new BufferedReader( new InputStreamReader(in)); StringBuilder str = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { str.append(line); } } catch (IOException e) { } try { in.close(); } catch (IOException e) { } html = str.toString(); return html; } } } On Thu, Mar 15, 2012 at 4:15 PM, Mark Murphy mmur...@commonsware.comwrote: You are not reading html source code of a page after page loading. You are downloading *a second copy of the page*. There is no direct means of getting at the HTML presently displayed in a WebView. Here is a StackOverflow question with some answers demonstrating some workarounds: http://stackoverflow.com/questions/2376471/how-do-i-get-the-web-page-contents-from-a-webview On Thu, Mar 15, 2012 at 1:12 AM, chowdary nani naveenneeli...@gmail.com wrote: Hi All I need help on reading html source code of a page after page loading in android following is my code Here i am able to read the source but the access tokens,user id and some data of the page are missing please help me. public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub super.onPageFinished(view, url); try { URL urlObj = new URL(http://ncpo.cc/test/example.php;); Log.d(url, urlObj.getHost()); HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(url); response = client.execute(request); String html = ; java.io.InputStream in = response.getEntity().getContent(); BufferedReader reader = new BufferedReader( new InputStreamReader(in)); StringBuilder str = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null
[android-developers] Need help on reading the html source of a page
Hi All I need help on reading html source code of a page after page loading in android following is my code Here i am able to read the source but the access tokens,user id and some data of the page are missing please help me. public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub super.onPageFinished(view, url); try { URL urlObj = new URL(http://ncpo.cc/test/example.php;); Log.d(url, urlObj.getHost()); HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(url); response = client.execute(request); String html = ; java.io.InputStream in = response.getEntity().getContent(); BufferedReader reader = new BufferedReader( new InputStreamReader(in)); StringBuilder str = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { str.append(line); } while ((line = reader.readLine()) != null) { str.append(line); } in.close(); html = str.toString(); if (html.contains(): !DOCTYPE html PUBLIC )) { } else { if (html.contains(Popular Media)) { mWebView.loadUrl(url); } else { Log.d(html in the else begining, html); } } } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } Please help me to solve this problem. Thanks Naveen. -- 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
Re: [android-developers] Re: Hi
Hi Anil, Thanks for time, Thanks for replay, Thanks for help will you please explain me with some example or will you sugest me any site for it. please its important to me. Thanks Naveen. On Mon, Mar 12, 2012 at 3:15 PM, Incredible success.anil...@gmail.comwrote: That can be handled through javascript written in your html code. That javascriopt can be intercepted by your android code. On Mar 12, 2:39 pm, chowdary nani naveenneeli...@gmail.com wrote: Hi all, I am working on loading URL in web view in android. i am able to load the gmail URL in web view when i entered email and password and click login button i need to read the response can any one help me in handling the button clicks in HTML Please help me in solving this . Thanks Naveen -- 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 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
Re: [android-developers] Re: Hi
Hi moktarul, Thanks for replay. Thanks for time i have created my own site and calling gmail api Thanks Naveen. On Tue, Mar 13, 2012 at 2:23 PM, moktarul anam mokta...@gmail.com wrote: Hi, r u using gmail.com or hav created ur own site and calling gmail api ? Moktarul On Monday, 12 March 2012 15:09:40 UTC+5:30, chowdary nani wrote: Hi all, I am working on loading URL in web view in android. i am able to load the gmail URL in web view when i entered email and password and click login button i need to read the response can any one help me in handling the button clicks in HTML Please help me in solving this . Thanks Naveen -- 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 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] Hi
Hi all, I am working on loading URL in web view in android. i am able to load the gmail URL in web view when i entered email and password and click login button i need to read the response can any one help me in handling the button clicks in HTML Please help me in solving this . Thanks Naveen -- 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] hi
hi all, Currently i working on webviews ie, i am able to load the urls in webpage when i click on button in web page i need to know which button is clicked here i need to know which button is clicked in html page and need to to some task please any one help me. Thanks Naveen. -- 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] hi
Hi All, Is it possible to convert bitmap image to .png image format in android Thanks Naveen -- 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] using custom views in xml layouts
Hi All, i am working with custom views using in xml layouts Following is my custom view code: public class CustomTextView extends View { private int m_nColor; private Typeface m_tTypeface; private int m_nSize; private int m_nRotationAngle, m_nRotationW, m_nRotationH; private String m_szText; public CustomTextView(Context context) { super(context); // set default parameters Log.d(dghgfhf, dfghgfh); m_nColor = Color.WHITE; m_nSize = 14; m_nRotationAngle = 0; m_nRotationW = 0; m_nRotationH = 0; m_tTypeface = Typeface.create(arial, Typeface.NORMAL); } public CustomTextView(Context context, AttributeSet attrs) { super(context, attrs); } public void SetColor(int newcolor) { m_nColor = newcolor; this.invalidate(); } public void SetTextSize(int newsize) { m_nSize = newsize; this.invalidate(); } // style: normal-0,bold-1,italic-2,bold-italic-3, public void SetFont(String newfontface, int style) { m_tTypeface = Typeface.create(newfontface, style); this.invalidate(); } public void SetRotation(int newangle, int neww, int newh) { m_nRotationAngle = newangle; m_nRotationW = neww; m_nRotationH = newh; this.invalidate(); } public void SetText(String newtext) { m_szText = newtext; this.invalidate(); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); paint.setTypeface(m_tTypeface); paint.setStyle(Paint.Style.FILL); paint.setColor(m_nColor); // paint.setShadowLayer(1, 0, 1, Color.parseColor(#00)); paint.setTextSize(m_nSize); canvas.rotate(m_nRotationAngle, m_nRotationW, m_nRotationH); canvas.drawText(m_szText, 0, 0, paint); } } Following is my layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:GUI= http://schemas.android.com/apk/res/net.pocketmagic.customangletext; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical view android:id=@+id/yourID android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=10dp class=net.pocketmagic.customangletext.CustomTextView / /LinearLayout i am getting null pointer exception i am unable find where i am going wrong please help me Thanks Naveen. -- 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
Fwd: [android-developers] using custom views in xml layouts
Hi magouyaware, Thanks for replay, Thanks for time, yes i am sure CustomView class is in the net.pocketmagic.customangletext package Thanks Naveen. -- Forwarded message -- From: Justin Anderson magouyaw...@gmail.com Date: Wed, Mar 7, 2012 at 12:26 AM Subject: Re: [android-developers] using custom views in xml layouts To: android-developers@googlegroups.com http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/LabelView.html http://developer.android.com/resources/samples/ApiDemos/res/layout/custom_view_1.html The first link is a sample of a custom class and the second is a sample of how to use that custom class in XML. The question I asked in your other (almost duplicate) post still stands though... Are you SURE that the CustomView class is in the net.pocketmagic. customangletext package? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 6, 2012 at 4:01 AM, Todd Grigsby tgrigsby...@gmail.com wrote: Not specific enough. Have you stepped through this code in debug to see what line is giving you the problem? On Mar 6, 2012 1:07 AM, chowdary nani naveenneeli...@gmail.com wrote: Hi All, i am working with custom views using in xml layouts Following is my custom view code: public class CustomTextView extends View { private int m_nColor; private Typeface m_tTypeface; private int m_nSize; private int m_nRotationAngle, m_nRotationW, m_nRotationH; private String m_szText; public CustomTextView(Context context) { super(context); // set default parameters Log.d(dghgfhf, dfghgfh); m_nColor = Color.WHITE; m_nSize = 14; m_nRotationAngle = 0; m_nRotationW = 0; m_nRotationH = 0; m_tTypeface = Typeface.create(arial, Typeface.NORMAL); } public CustomTextView(Context context, AttributeSet attrs) { super(context, attrs); } public void SetColor(int newcolor) { m_nColor = newcolor; this.invalidate(); } public void SetTextSize(int newsize) { m_nSize = newsize; this.invalidate(); } // style: normal-0,bold-1,italic-2,bold-italic-3, public void SetFont(String newfontface, int style) { m_tTypeface = Typeface.create(newfontface, style); this.invalidate(); } public void SetRotation(int newangle, int neww, int newh) { m_nRotationAngle = newangle; m_nRotationW = neww; m_nRotationH = newh; this.invalidate(); } public void SetText(String newtext) { m_szText = newtext; this.invalidate(); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); paint.setTypeface(m_tTypeface); paint.setStyle(Paint.Style.FILL); paint.setColor(m_nColor); // paint.setShadowLayer(1, 0, 1, Color.parseColor(#00)); paint.setTextSize(m_nSize); canvas.rotate(m_nRotationAngle, m_nRotationW, m_nRotationH); canvas.drawText(m_szText, 0, 0, paint); } } Following is my layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:GUI= http://schemas.android.com/apk/res/net.pocketmagic.customangletext; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical view android:id=@+id/yourID android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=10dp class=net.pocketmagic.customangletext.CustomTextView / /LinearLayout i am getting null pointer exception i am unable find where i am going wrong please help me Thanks Naveen. -- 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 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 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
[android-developers] Displaying Facebook Albums
Hi All, I am working on facebook integration . Here i need some code to read the status messages of face book Using graph api in android sdk Please help me Thanks Naveen. -- 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
Re: [android-developers] Re: displaying face book albums and photos
Ali Chousein, Thanks for replay. Thanks for considering Thanks for help. I have already worked on those links I need some code as i am new to android I have tried a lot of ways but i am unable to get response please help me by posting some code. Thanks Naveen On Wed, Feb 22, 2012 at 2:54 PM, Ali Chousein ali.chous...@gmail.comwrote: Your question is related to usage of Facebook Graph API and not to usage of Android SDK. But anyway, take a look at the links below, they should guide you on how to access your albums and photos in Facebook programmatically. https://developers.facebook.com/docs/reference/api/album/ https://developers.facebook.com/docs/reference/api/photo/ - Ali Chousein http://www.codeproject.com/KB/android/PayGol-Android.aspx http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy http://geo-filtered-assistant.blogspot.com https://marketplace.cisco.com/apphq/products/994 -- 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 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
Re: [android-developers] Re: displaying face book albums and photos
Hi Moktarul, Thanks for response, Thanks for considering. I nee help on how to get responses in android. how to open those urls in amy app to get responses. when i try to open those urls iam getting error as token expires. please help me with some code please help me Thanks Naveen. On Wed, Feb 22, 2012 at 3:17 PM, moktarul anam mokta...@gmail.com wrote: Hi, Please go through this link http://stackoverflow.com/questions/7454284/get-my-facebook-album-photos-in-android-java Hope this will solve ur problem Moktarul On Feb 22, 2:31 pm, chowdary nani naveenneeli...@gmail.com wrote: Ali Chousein, Thanks for replay. Thanks for considering Thanks for help. I have already worked on those links I need some code as i am new to android I have tried a lot of ways but i am unable to get response please help me by posting some code. Thanks Naveen On Wed, Feb 22, 2012 at 2:54 PM, Ali Chousein ali.chous...@gmail.com wrote: Your question is related to usage of Facebook Graph API and not to usage of Android SDK. But anyway, take a look at the links below, they should guide you on how to access your albums and photos in Facebook programmatically. https://developers.facebook.com/docs/reference/api/album/ https://developers.facebook.com/docs/reference/api/photo/ - Ali Chousein http://www.codeproject.com/KB/android/PayGol-Android.aspx http://weatherbuddy.blogspot.com|http://twitter.com/weather_buddy http://geo-filtered-assistant.blogspot.com https://marketplace.cisco.com/apphq/products/994 -- 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 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 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] displaying face book albums and photos
Hi All, I have integrated face book in to my app i am able to post status messages on the wall i am able to post photos on the wall Please any one help me to display face book photos and albums Thanks Naveen -- 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] hi
Hi all, I am working on displaying the image in rounded corner image view when i used to drag the image the image is coming out of the borders and displaying in rectangle please help me Thanks Naveen. -- 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
Re: [android-developers] Re: Problem in using frame layout
Hi Moktarul, Thanks for replay, thanks for time But i am getting same problem will u please help me. Thanks Naveen. On Thu, Feb 16, 2012 at 3:52 PM, moktarul anam mokta...@gmail.com wrote: Hi, 1. In frameLayout use focusable false and clickable also false 2. in imageView use give some padding (android:padding=5dip for selection color) next will tell u later Enjoy Moktarul - Hide quoted text - On Thu, Feb 16, 2012 at 3:38 PM, chowdary nani naveenneeli...@gmail.com wrote: Hi moktarul anam. Thanks for time here is my frame lay out code FrameLayout android:id=@+id/frameLayout1 android:layout_width=180dp android:layout_height=240dp android:layout_marginLeft=20dip android:layout_marginTop=20dip android:background=@drawable/roundedselect ImageView android:id=@+id/imageView1 android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/iphoneforimagecon android:scaleType=matrix / /FrameLayout roundeselect.xml code is as follows: shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=rectangle solid android:color=#FF / stroke android:width=2dip android:color=#00 / corners android:bottomLeftRadius=20dip android:bottomRightRadius=20dip android:topLeftRadius=20dip android:topRightRadius=20dip / /shape please help me for this Thanks Naveen. On Feb 10, 10:20 am, chowdary nani naveenneeli...@gmail.com wrote: Hi All, I am working with image view and frame layout i have a frame layout with rounded borders frame layout consists of image view when i select image from gallery view the image is displaying in image view here i have a problem i.e, when the image displaying in the image view it is displaying in rectangle insted of round borders Please help me. Thanks Naveen -- 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 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] Rounded image view
Hi all, I am working on images here my images are from server i need to display those images in rounded corner i have set background with round border when i set image through code i am displaying the image in rectangle here is code ?xml version=1.0 encoding=utf-8? layer-list xmlns:android=http://schemas.android.com/apk/res/android; item android:drawable=@drawable/iphoneforimagecon shape android:shape=rectangle corners android:radius=30dip / solid android:color=#d8d8d8 / stroke android:drawable=@drawable/iphoneforimagecon android:width=2dip android:color=#00 / /shape /item /layer-list Please help me. Thanks Naveen. -- 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
Re: [android-developers] Rounded image view
Hi Ratheesh Valamchuzhy, Thanks for help. Thanks for time. But i have gou some error in the which you have sent to me i.e, paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); can i know what is Mode.SRC_IN. Thanks in advance. Thanks Naveen. On Thu, Feb 9, 2012 at 2:06 PM, Ratheesh Valamchuzhy android...@gmail.comwrote: you can use the image helper class to make rounded border package com.Skadate; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Bitmap.Config; import android.graphics.PorterDuff.Mode; public class ImageHelper { public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, int pixels) { Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap .getHeight(), Config.ARGB_); Canvas canvas = new Canvas(output); final int color = 0xff424242; final Paint paint = new Paint(); final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); final RectF rectF = new RectF(rect); final float roundPx = pixels; paint.setAntiAlias(true); canvas.drawARGB(0, 0, 0, 0); paint.setColor(color); canvas.drawRoundRect(rectF, roundPx, roundPx, paint); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); canvas.drawBitmap(bitmap, rect, rect, paint); return output; } } in java file bitmap=ImageHelper.getRoundedCornerBitmap(yourbitmap); -- 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 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
Re: [android-developers] Re: Rounded image view
Hi skink , I need to display my image or frame with rounded corners Thanks for concern. Thanks for time. Thanks for replay. Thanks Naveen. On Thu, Feb 9, 2012 at 2:15 PM, skink psk...@gmail.com wrote: chowdary nani wrote: Please help me. but with what? what's your goal? do you want your image to have rounded corners or the frame needs to be rounded? 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 -- 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
Re: [android-developers] Re: Rounded image view
On Thu, Feb 9, 2012 at 2:23 PM, chowdary nani naveenneeli...@gmail.comwrote: Hi skink , I neen rounded corners for frame please help me Thanks for concern. Thanks for time. Thanks for replay. Thanks Naveen. On Thu, Feb 9, 2012 at 2:15 PM, skink psk...@gmail.com wrote: chowdary nani wrote: Please help me. but with what? what's your goal? do you want your image to have rounded corners or the frame needs to be rounded? 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 -- 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] Problem in using frame layout
Hi All, I am working with image view and frame layout i have a frame layout with rounded borders frame layout consists of image view when i select image from gallery view the image is displaying in image view here i have a problem i.e, when the image displaying in the image view it is displaying in rectangle insted of round borders Please help me. Thanks Naveen -- 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] hi all
Hi All, I am working on xml parsing. Here i am able to parse the xml page which is on server when i have given the url directly. but i need for dynamically created url following is my code. String tod = IPH; final Random myRandom = new Random(); String procod = String.valueOf(myRandom .nextInt( - + 1)); shopapi = http://api.shopvisible.com/ProductService.asmx/CreateBasicProduct?ClientName=IncipioBespokeguid=fa63b21c-115a-e011-96ff-0026b95352bbInboundProductXML= ; shopapi = shopapi.concat(Product); shopapi = shopapi.concat(ProductPartNoBCC-); shopapi = shopapi.concat(tod); shopapi = shopapi.concat(-); shopapi = shopapi.concat(procod); shopapi = shopapi.concat(/ProductPartNo); shopapi = shopapi.concat(ProductUPCbespoke/ProductUPC); shopapi = shopapi .concat(ProductCodebespoke Custom Case/ProductCode); shopapi = shopapi .concat(NameCustomized Case/NameBrand23/BrandSubCategory1/SubCategory); shopapi = shopapi.concat(ImageName); shopapi = shopapi.concat(the_string_response1); shopapi = shopapi.concat(/ImageName); shopapi = shopapi.concat(Price29.99/Price); shopapi = shopapi .concat(Orderabletrue/OrderableQuantity50/QuantityWeight0.0/WeightSubWeight3/SubWeight); shopapi = shopapi.concat(CustomText/CustomText); shopapi = shopapi.concat(Xtra2/Xtra2); shopapi = shopapi.concat(/Product); SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); /** Send URL to parse XML Tags */ // String a = // http://api.shopvisible.com/ProductService.asmx/CreateBasicProduct?ClientName=IncipioBespokeguid=fa63b21c-115a-e011-96ff-0026b95352bbInboundProductXML=%3CProduct%3E%3CProductPartNo%3EBCC-IPH-9809%3C/ProductPartNo%3E%3CProductUPC%3Ebespoke%3C/ProductUPC%3E%3CProductCode%3Ebespoke%20Custom%20Case%3C/ProductCode%3E%3CName%3ECustomized%20Case%3C/Name%3E%3CBrand%3E23%3C/Brand%3E%3CSubCategory%3E1%3C/SubCategory%3E%3CImageName%3Ehttp://ncpo.cc/android/bespokecaseimages/553005.jpg%3C/ImageName%3E%3CPrice%3E29.99%3C/Price%3E%3COrderable%3Etrue%3C/Orderable%3E%3CQuantity%3E50%3C/Quantity%3E%3CWeight%3E0.0%3C/Weight%3E%3CSubWeight%3E3%3C/SubWeight%3E%3CCustomText%3E%3C/CustomText%3E%3CXtra2%3E%3C/Xtra2%3E%3C/Product%3E ; // URL sourceUrl = new URL(a); URL sourceUrl = new URL(shopapi); /** Create handler to handle XML Tags ( extends DefaultHandler ) */ try { XmlhandlerForShopapi myXMLHandler = new XmlhandlerForShopapi(); xr.setContentHandler(myXMLHandler); xr.parse(new InputSource(sourceUrl.openStream())); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ParserConfigurationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); } please help me. Thanks Naveen. -- 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] Hai all
Hi All, I need help on taking the screen shoot using android code. i need to take screen hoot for particular portion of the screen only can any one help me in passing the parameters for the screen shoot here is my following code. View v1 = L1.getRootView(); v1.setDrawingCacheEnabled(true); Bitmap bm = v1.getDrawingCache(); BitmapDrawable bitmapDrawable = new BitmapDrawable(bm); image = (ImageView) findViewById(R.id.ImageView01); image.setBackgroundDrawable(bitmapDrawable); Thanks Naveen. -- 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] help on uploading image to server
Hi all, I am trying to upload image to php server but it is not up loading here is my following code public class ImageUpload extends Activity { Bitmap bm; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); try { bm = BitmapFactory.decodeResource(getResources(), R.drawable.icon); // bm = BitmapFactory.decodeFile(/sdcard/DCIM/forest.png); executeMultipartPost(); } catch (Exception e) { Log.e(e.getClass().getName(), e.getMessage()); } } public void executeMultipartPost() throws Exception { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); bm.compress(CompressFormat.JPEG, 75, bos); byte[] data = bos.toByteArray(); HttpClient httpClient = new DefaultHttpClient(); HttpPost postRequest = new HttpPost( http://ncpo.cc/android/uploadbespokecase.php;); // ByteArrayBody bab = new ByteArrayBody(data, icon.jpg); File file = new File(/sdcard/FB_loginnew.png); FileBody bin = new FileBody(file); MultipartEntity reqEntity = new MultipartEntity( HttpMultipartMode.BROWSER_COMPATIBLE); reqEntity.addPart(uploaded, bin); reqEntity.addPart(photoCaption, new StringBody(sfsdfsdf)); postRequest.setEntity(reqEntity); HttpResponse response = httpClient.execute(postRequest); BufferedReader reader = new BufferedReader(new InputStreamReader( response.getEntity().getContent(), UTF-8)); String sResponse; StringBuilder s = new StringBuilder(); while ((sResponse = reader.readLine()) != null) { s = s.append(sResponse); } System.out.println(Response: + s); Log.d(Image up load, Response + s); bm.recycle(); } catch (Exception e) { // handle exception here Log.e(e.getClass().getName(), e.getMessage()); } } } Please any one help me . i am un able to find the errror. -- 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
Re: [android-developers] help on uploading image to server
Hi Ratheesh Valamchuzhy, Thanks for replay.Thanks for help .Thanks for time. will you please send me the code for it. Again thanks for time Thanks Naveen. On Wed, Jan 25, 2012 at 12:15 PM, Ratheesh Valamchuzhy android...@gmail.com wrote: In multiaprt http pst you need to pass the byte array , here you are passing the file body -- 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 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] Hi
Hi All, I am working on json parsing i need help on sample code for passing the parsed data to list view without can any one help me for this here is my following code i am unable to display the list package com.incipio.bespoke; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicHttpResponse; import org.apache.http.message.BasicNameValuePair; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.Activity; import android.app.ListActivity; import android.app.ProgressDialog; import android.content.Context; import android.graphics.Color; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.SimpleAdapter; public class FB_TWListActivity extends ListActivity { ArrayListHashMapString, String mylist = new ArrayListHashMapString, String(); @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stubg super.onCreate(savedInstanceState); FaceBookTask facebooktask = new FaceBookTask(FB_TWListActivity.this); facebooktask.execute(null); Log.d(fblist, fb list); setContentView(R.layout.fb_twlistxml); Log.d(fblist, fb list 3); ListAdapter adapter = new SimpleAdapter(this, mylist, R.layout.fb_twtv, new String[] { name, message, link }, new int[] { R.id.textView1, R.id.textView2, R.id.textView3 }); Log.d(fblist, fb list 4); setListAdapter(adapter); final ListView lv = getListView(); lv.setTextFilterEnabled(true); lv.setCacheColorHint(Color.TRANSPARENT); } JSONObject from; String str_name, message, link; HashMapString, String listItems = new HashMapString, String(); class FaceBookTask extends AsyncTaskJSONObject, Void, JSONObject { ProgressDialog progressDialog = null; public FaceBookTask(Context context) { // TODO Auto-generated constructor stub progressDialog = new ProgressDialog(context); } @Override protected void onPreExecute() { // TODO Auto-generated method stub progressDialog.setMessage(Getting edit..); progressDialog.show(); super.onPreExecute(); } @Override protected void onProgressUpdate(Void... values) { // TODO Auto-generated method stub super.onProgressUpdate(values); } @Override protected void onPostExecute(JSONObject result) { // TODO Auto-generated method stub if (progressDialog.isShowing()) { progressDialog.dismiss(); } super.onPostExecute(result); } @Override protected JSONObject doInBackground(JSONObject... arg0) { // TODO Auto-generated method stub HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost( http://ncpo.cc/mashup/facebookfeed.php;); List nameValuePairs = new ArrayList(); nameValuePairs.add(new BasicNameValuePair(name, AboutUsActivity.name)); try { httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs, UTF-8)); /* * processing http request */ BasicHttpResponse httpResponse; httpResponse = (BasicHttpResponse) httpClient.execute(httpPost); /* * processing to get basic response */ BasicResponseHandler handler = new BasicResponseHandler(); String response = handler.handleResponse(httpResponse); Log.d(Facebooktask, EDIT RESPONSE + response); try { JSONObject json_response = new JSONObject(response); Log.d(Facebooktask, json_response + json_response); String data = new String(response); Log.d(Facebooktask, String data + data); JSONArray data1 = json_response.getJSONArray(data); Log.d(about us, data1 + data1); for (int i = 0; i data1.length(); i++) { try { String id =
Re: [android-developers] hi all
Hi chandara your link has helped me a lot thanks for your time thanks for sending. On Wed, Jan 11, 2012 at 12:25 PM, Chandra Sekhar chandra4...@gmail.comwrote: Hi Naveen, I think this link may help u http://coderzheaven.com/2011/06/complex-json-string-parsing-in-android/ On Tue, Jan 10, 2012 at 6:01 PM, chowdary nani naveenneeli...@gmail.comwrote: Hi All, I am working with json parsing Following is my json object will please any one help me how to parse id from that object in android {data:[{id:38314877099_10150452362217100,from:{name:Incipio Technologies}}]} Thanks Naveen -- 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 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 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] hi
HI All, I need help on rss feed parsing in android can any one help me please. Thanks Naveen -- 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] hi
Hi All, I am working on rss parsing i am unable to display the rss feeds and i am unable to find the problem. here is my code public class RSSReader extends Activity implements OnItemClickListener { public final String RSSFEEDOFCHOICE = http://www.ibm.com/developerworks/views/rss/customrssatom.jsp?zone_by=XMLzone_by=Javazone_by=Rationalzone_by=Linuxzone_by=Open+sourcezone_by=WebSpheretype_by=Tutorialssearch_by=day=1month=06year=2007max_entries=20feed_by=rssisGUI=trueSubmit.x=48Submit.y=14 ; private static final int SELECT = 0; private static final int REFRESH = 1; public final String tag = RSSReader; private RSSFeed feed = null; /** Called when the activity is first created. */ public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); // go get our feed! feed = getFeed(RSSFEEDOFCHOICE); // display UI UpdateDisplay(); } private RSSFeed getFeed(String urlToRssFeed) { try { // setup the url URL url = new URL(urlToRssFeed); // create the factory SAXParserFactory factory = SAXParserFactory.newInstance(); // create a parser SAXParser parser = factory.newSAXParser(); // create the reader (scanner) XMLReader xmlreader = parser.getXMLReader(); // instantiate our handler RSSHandler theRssHandler = new RSSHandler(); // assign our handler xmlreader.setContentHandler(theRssHandler); // get our data via the url class InputSource is = new InputSource(url.openStream()); // perform the synchronous parse xmlreader.parse(is); // get the results - should be a fully populated RSSFeed instance, // or null on error return theRssHandler.getFeed(); } catch (Exception ee) { // if we have a problem, simply return null return null; } } public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); menu.add(0, RSSReader.SELECT, 0, Choose RSS Feed).setIcon( android.R.drawable.ic_menu_mapmode); // menu.add(0,0,Choose RSS Feed); // menu.add(0,1,Refresh); menu.add(0, RSSReader.REFRESH, 0, Refresh).setIcon( android.R.drawable.ic_menu_mapmode); Log.i(tag, onCreateOptionsMenu); return true; } @Override public boolean onMenuItemSelected(final int featureId, final MenuItem item) { switch (item.getItemId()) { case RSSReader.SELECT: Log.i(tag, Set RSS Feed); return true; case RSSReader.REFRESH: Log.i(tag, Refreshing RSS Feed); return true; } return false; } private void UpdateDisplay() { TextView feedtitle = (TextView) findViewById(R.id.feedtitle); TextView feedpubdate = (TextView) findViewById(R.id.feedpubdate); ListView itemlist = (ListView) findViewById(R.id.itemlist); if (feed == null) { feedtitle.setText(No RSS Feed Available); return; } feedtitle.setText(feed.getTitle()); feedpubdate.setText(feed.getPubDate()); ArrayAdapterRSSItem adapter = new ArrayAdapterRSSItem(this, android.R.layout.simple_list_item_1, feed.getAllItems()); itemlist.setAdapter(adapter); itemlist.setOnItemClickListener(this); itemlist.setSelection(0); } public void onItemClick(AdapterView parent, View v, int position, long id) { Log.i(tag, item clicked! [ + feed.getItem(position).getTitle() + ]); Intent itemintent = new Intent(this, ShowDescription.class); Bundle b = new Bundle(); b.putString(title, feed.getItem(position).getTitle()); b.putString(description, feed.getItem(position).getDescription()); b.putString(link, feed.getItem(position).getLink()); b.putString(pubdate, feed.getItem(position).getPubDate()); itemintent.putExtra(android.intent.extra.INTENT, b); // startSubActivity(itemintent,0); startActivity(itemintent); } } public class RSSReader extends Activity implements OnItemClickListener { public final String RSSFEEDOFCHOICE = http://www.ibm.com/developerworks/views/rss/customrssatom.jsp?zone_by=XMLzone_by=Javazone_by=Rationalzone_by=Linuxzone_by=Open+sourcezone_by=WebSpheretype_by=Tutorialssearch_by=day=1month=06year=2007max_entries=20feed_by=rssisGUI=trueSubmit.x=48Submit.y=14 ; private static final int SELECT = 0; private static final int REFRESH = 1; public final String tag = RSSReader; private RSSFeed feed = null; /** Called when the activity is first created. */ public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main);
Re: [android-developers] hi
yes that is the link i need parse i am geetting error at reading the feeds i am unable to read the feeds i.e, i am getting empty eeds On Thu, Jan 12, 2012 at 12:27 PM, Robinns librain.ro...@gmail.com wrote: Is the link u want to parse is in RSS format On Jan 12, 2012 12:35 PM, chowdary nani naveenneeli...@gmail.com wrote: Hi All, I am working on rss parsing i am unable to display the rss feeds and i am unable to find the problem. here is my code he feeds public class RSSReader extends Activity implements OnItemClickListener { public final String RSSFEEDOFCHOICE = http://www.ibm.com/developerworks/views/rss/customrssatom.jsp?zone_by=XMLzone_by=Javazone_by=Rationalzone_by=Linuxzone_by=Open+sourcezone_by=WebSpheretype_by=Tutorialssearch_by=day=1month=06year=2007max_entries=20feed_by=rssisGUI=trueSubmit.x=48Submit.y=14 ; private static final int SELECT = 0; private static final int REFRESH = 1; public final String tag = RSSReader; private RSSFeed feed = null; /** Called when the activity is first created. */ public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); // go get our feed! feed = getFeed(RSSFEEDOFCHOICE); // display UI UpdateDisplay(); } private RSSFeed getFeed(String urlToRssFeed) { try { // setup the url URL url = new URL(urlToRssFeed); // create the factory SAXParserFactory factory = SAXParserFactory.newInstance(); // create a parser SAXParser parser = factory.newSAXParser(); // create the reader (scanner) XMLReader xmlreader = parser.getXMLReader(); // instantiate our handler RSSHandler theRssHandler = new RSSHandler(); // assign our handler xmlreader.setContentHandler(theRssHandler); // get our data via the url class InputSource is = new InputSource(url.openStream()); // perform the synchronous parse xmlreader.parse(is); // get the results - should be a fully populated RSSFeed instance, // or null on error return theRssHandler.getFeed(); } catch (Exception ee) { // if we have a problem, simply return null return null; } } public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); menu.add(0, RSSReader.SELECT, 0, Choose RSS Feed).setIcon( android.R.drawable.ic_menu_mapmode); // menu.add(0,0,Choose RSS Feed); // menu.add(0,1,Refresh); menu.add(0, RSSReader.REFRESH, 0, Refresh).setIcon( android.R.drawable.ic_menu_mapmode); Log.i(tag, onCreateOptionsMenu); return true; } @Override public boolean onMenuItemSelected(final int featureId, final MenuItem item) { switch (item.getItemId()) { case RSSReader.SELECT: Log.i(tag, Set RSS Feed); return true; case RSSReader.REFRESH: Log.i(tag, Refreshing RSS Feed); return true; } return false; } private void UpdateDisplay() { TextView feedtitle = (TextView) findViewById(R.id.feedtitle); TextView feedpubdate = (TextView) findViewById(R.id.feedpubdate); ListView itemlist = (ListView) findViewById(R.id.itemlist); if (feed == null) { feedtitle.setText(No RSS Feed Available); return; } feedtitle.setText(feed.getTitle()); feedpubdate.setText(feed.getPubDate()); ArrayAdapterRSSItem adapter = new ArrayAdapterRSSItem(this, android.R.layout.simple_list_item_1, feed.getAllItems()); itemlist.setAdapter(adapter); itemlist.setOnItemClickListener(this); itemlist.setSelection(0); } public void onItemClick(AdapterView parent, View v, int position, long id) { Log.i(tag, item clicked! [ + feed.getItem(position).getTitle() + ]); Intent itemintent = new Intent(this, ShowDescription.class); Bundle b = new Bundle(); b.putString(title, feed.getItem(position).getTitle()); b.putString(description, feed.getItem(position).getDescription()); b.putString(link, feed.getItem(position).getLink()); b.putString(pubdate, feed.getItem(position).getPubDate()); itemintent.putExtra(android.intent.extra.INTENT, b); // startSubActivity(itemintent,0); startActivity(itemintent); } } public class RSSReader extends Activity implements OnItemClickListener { public final String RSSFEEDOFCHOICE = http://www.ibm.com/developerworks/views/rss/customrssatom.jsp?zone_by=XMLzone_by=Javazone_by=Rationalzone_by=Linuxzone_by=Open+sourcezone_by
[android-developers] hi
Hi All, I am working with json parsing Following is my json object will please any one help me how to parse id from that object in android {data:[{id:38314877099_10150452362217100}]} Thanks Naveen -- 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
Re: [android-developers] hi
Hi Robinns Thanks for your help thanks for response. your code help me a lot On Tue, Jan 10, 2012 at 5:25 PM, Robinns librain.ro...@gmail.com wrote: private void parseJson(String j){ JSONObject jObj = new JSONObject(j); JSONArray jArray - jObj.getJSONArray(data); for(int i=0;ijArray.length();i++){ JSONObject post = jArray.getJSONObject(i); System.out.print(post.getString(id)); } } Hope it helps On Tue, Jan 10, 2012 at 5:33 PM, chowdary nani naveenneeli...@gmail.comwrote: Hi All, I am working with json parsing Following is my json object will please any one help me how to parse id from that object in android {data:[{id:38314877099_10150452362217100}]} Thanks Naveen -- 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 -- Robin -- 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 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] hi all
Hi All, I am working with json parsing Following is my json object will please any one help me how to parse id from that object in android {data:[{id:38314877099_10150452362217100,from:{name:Incipio Technologies}}]} Thanks Naveen -- 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] Hi
chowdary nani 6:01 PM (0 minutes ago) to android-develo. Hi All, I am working with json parsing Following is my json object will please any one help me how to parse name from that object in android {data:[{id:38314877099_ 10150452362217100,from:{name:Incipio Technologies}}]} Thanks Naveen -- 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
Re: [android-developers] Re: hi
Hi Robin, i again need small help in the same thing i.e, to parse name from this object {data:[{id:38314877099_10150452362217100,from:{ name:Incipio Technologies}}]} Thanks Naveen. -- 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] need help in coding for flickr integration
Hi All, Can any one please help me in coding Flickr integration in android Thanks Naveen. -- 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] need help in twitter integration
Hi All, i am working on twitter integration in android but i am getting error in my applicatio at this place please help me. here my code public class OAuthRequestTokenTask extends AsyncTaskVoid, Void, Void { final String TAG = getClass().getName(); private Context context; private OAuthProvider provider; private OAuthConsumer consumer; public OAuthRequestTokenTask(Context context, OAuthConsumer consumer, OAuthProvider provider) { this.context = context; this.consumer = consumer; this.provider = provider; } @Override protected Void doInBackground(Void... params) { try { Log.i(TAG, Retrieving request token from Google servers); final String url = provider.retrieveRequestToken(consumer, Constants.OAUTH_CALLBACK_URL); Log.i(TAG, Popping a browser with the authorize URL : + url); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)) .setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_FROM_BACKGROUND); context.startActivity(intent); } catch (Exception e) { Log.e(TAG, Error during OAUth retrieve request token, e); } return null; } } Thanks Naveen -- 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
Fwd: [android-developers] need help in twitter integration
Hi dEEPESH PPM , Thanks for help, Thanks for replay, I am currently working with emulator and i am getting this problem will u please help me Thanks Naveen. ** * * *Please check your device clock and adjust with current time. I had the same issue in my app. I am solving this issue bu correcting the android device time.You can solve this issue* * * *Regards* * * *Deepesh C* On Mon, Jan 9, 2012 at 3:45 PM, chowdary nani naveenneeli...@gmail.comwrote: Hi All, i am working on twitter integration in android but i am getting error in my applicatio at this place please help me. here my code public class OAuthRequestTokenTask extends AsyncTaskVoid, Void, Void { final String TAG = getClass().getName(); private Context context; private OAuthProvider provider; private OAuthConsumer consumer; public OAuthRequestTokenTask(Context context, OAuthConsumer consumer, OAuthProvider provider) { this.context = context; this.consumer = consumer; this.provider = provider; } @Override protected Void doInBackground(Void... params) { try { Log.i(TAG, Retrieving request token from Google servers); final String url = provider.retrieveRequestToken(consumer, Constants.OAUTH_CALLBACK_URL); Log.i(TAG, Popping a browser with the authorize URL : + url); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)) .setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_FROM_BACKGROUND); context.startActivity(intent); } catch (Exception e) { Log.e(TAG, Error during OAUth retrieve request token, e); } return null; } } Thanks Naveen -- 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 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 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
Fwd: [android-developers] Need help in twitter integration
-- Forwarded message -- From: chowdary nani naveenneeli...@gmail.com Date: Sat, Jan 7, 2012 at 6:16 PM Subject: Re: [android-developers] Need help in twitter integration To: android-developers@googlegroups.com *Hi, Mukesh Kumar*, Thanks for replay , Thanks for checking mail,thanks for replay. but i am still getting the same error as OAuthRequestTokenTask(1695): Error during OAUth retrieve request token please help me in solving this error in twitter integration. Thanks Swathi. On Fri, Jan 6, 2012 at 12:32 PM, Mukesh Srivastav mukicha...@gmail.comwrote: Naveen, The solution is very simple, you create a Twitterutil class and use it for sending Tweets and also getting the Tweets. Below is my example to do it. public class TwitterUtils { public static boolean isAuthenticated(SharedPreferences prefs) { String token = prefs.getString(OAuth.OAUTH_TOKEN, ); String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, ); AccessToken a = new AccessToken(token, secret); Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(AppConstants.CONSUMER_KEY, AppConstants.CONSUMER_SECRET); twitter.setOAuthAccessToken(a); try { twitter.getAccountSettings(); return true; } catch (TwitterException e) { return false; } } public static void sendTweet(SharedPreferences prefs, String msg) throws Exception { String token = prefs.getString(OAuth.OAUTH_TOKEN, ); String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, ); AccessToken a = new AccessToken(token, secret); Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(AppConstants.CONSUMER_KEY, AppConstants.CONSUMER_SECRET); twitter.setOAuthAccessToken(a); twitter.updateStatus(msg); } public static String getTweets(SharedPreferences prefs) { String token = prefs.getString(OAuth.OAUTH_TOKEN, ); String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, ); StringBuffer stb = new StringBuffer(); AccessToken a = new AccessToken(token, secret); Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(AppConstants.CONSUMER_KEY, AppConstants.CONSUMER_SECRET); twitter.setOAuthAccessToken(a); try { ResponseListStatus liststatus = twitter.getFriendsTimeline(); for (Status status : liststatus) { stb.append(status.getText()); // System.out.println(I am reading other Twitter Status + // status.getText()); } } catch (TwitterException e) { // TODO Auto-generated catch block e.printStackTrace(); } return stb.toString(); } To use it.. if (TwitterUtils.isAuthenticated(prefs)) { //if user logged in , send the twit sendTweet(); // } public void sendTweet() { Thread t = new Thread() { public void run() { try { TwitterUtils.sendTweet(prefs,getTweetMsg()); mTwitterHandler.post(mUpdateTwitterNotification); } catch (Exception ex) { ex.printStackTrace(); } } }; t.start(); } -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. On Fri, Jan 6, 2012 at 11:57 AM, chowdary nani naveenneeli...@gmail.comwrote: Hi All, I am working on twittwer in tegration in android I am trying to post tweet on my twitter but i am getting error as Error during OAUth retrieve request token here is the followin code: tweet.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (TwitterUtils.isAuthenticated(prefs)) { sendTweet(); } else { Intent i = new Intent(getApplicationContext(), PrepareRequestTokenActivity.class); i.putExtra(tweet_msg, getTweetMsg()); startActivity(i); } } }); public void sendTweet() { Thread t = new Thread() { public void run() { try { TwitterUtils.sendTweet(prefs, getTweetMsg()); mTwitterHandler.post(mUpdateTwitterNotification); } catch (Exception ex) { ex.printStackTrace(); } } }; t.start(); } public class PrepareRequestTokenActivity extends Activity { final String TAG = getClass().getName(); private OAuthConsumer consumer; private OAuthProvider provider; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { this.consumer = new CommonsHttpOAuthConsumer( Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET); this.provider = new CommonsHttpOAuthProvider(Constants.REQUEST_URL, Constants.ACCESS_URL, Constants.AUTHORIZE_URL); } catch (Exception e) { Log.e(TAG, Error creating consumer / provider, e); } Log.i(TAG, Starting task to retrieve request token.); new OAuthRequestTokenTask(this, consumer, provider).execute(); } @Override public void onNewIntent(Intent intent) { super.onNewIntent(intent); SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(this); final Uri uri = intent.getData(); if (uri != null uri.getScheme().equals(Constants.OAUTH_CALLBACK_SCHEME)) { Log.i(TAG, Callback received : + uri); Log.i(TAG, Retrieving Access
Re: [android-developers] Need help in twitter integration
*Hi, Mukesh Kumar*, Thanks for replay , Thanks for checking mail,thanks for replay. but i am still getting the same error as OAuthRequestTokenTask(1695): Error during OAUth retrieve request token please help me in solving this error in twitter integration. Thanks Swathi. On Fri, Jan 6, 2012 at 12:32 PM, Mukesh Srivastav mukicha...@gmail.comwrote: Naveen, The solution is very simple, you create a Twitterutil class and use it for sending Tweets and also getting the Tweets. Below is my example to do it. public class TwitterUtils { public static boolean isAuthenticated(SharedPreferences prefs) { String token = prefs.getString(OAuth.OAUTH_TOKEN, ); String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, ); AccessToken a = new AccessToken(token, secret); Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(AppConstants.CONSUMER_KEY, AppConstants.CONSUMER_SECRET); twitter.setOAuthAccessToken(a); try { twitter.getAccountSettings(); return true; } catch (TwitterException e) { return false; } } public static void sendTweet(SharedPreferences prefs, String msg) throws Exception { String token = prefs.getString(OAuth.OAUTH_TOKEN, ); String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, ); AccessToken a = new AccessToken(token, secret); Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(AppConstants.CONSUMER_KEY, AppConstants.CONSUMER_SECRET); twitter.setOAuthAccessToken(a); twitter.updateStatus(msg); } public static String getTweets(SharedPreferences prefs) { String token = prefs.getString(OAuth.OAUTH_TOKEN, ); String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, ); StringBuffer stb = new StringBuffer(); AccessToken a = new AccessToken(token, secret); Twitter twitter = new TwitterFactory().getInstance(); twitter.setOAuthConsumer(AppConstants.CONSUMER_KEY, AppConstants.CONSUMER_SECRET); twitter.setOAuthAccessToken(a); try { ResponseListStatus liststatus = twitter.getFriendsTimeline(); for (Status status : liststatus) { stb.append(status.getText()); // System.out.println(I am reading other Twitter Status + // status.getText()); } } catch (TwitterException e) { // TODO Auto-generated catch block e.printStackTrace(); } return stb.toString(); } To use it.. if (TwitterUtils.isAuthenticated(prefs)) { //if user logged in , send the twit sendTweet(); // } public void sendTweet() { Thread t = new Thread() { public void run() { try { TwitterUtils.sendTweet(prefs,getTweetMsg()); mTwitterHandler.post(mUpdateTwitterNotification); } catch (Exception ex) { ex.printStackTrace(); } } }; t.start(); } -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. On Fri, Jan 6, 2012 at 11:57 AM, chowdary nani naveenneeli...@gmail.comwrote: Hi All, I am working on twittwer in tegration in android I am trying to post tweet on my twitter but i am getting error as Error during OAUth retrieve request token here is the followin code: tweet.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (TwitterUtils.isAuthenticated(prefs)) { sendTweet(); } else { Intent i = new Intent(getApplicationContext(), PrepareRequestTokenActivity.class); i.putExtra(tweet_msg, getTweetMsg()); startActivity(i); } } }); public void sendTweet() { Thread t = new Thread() { public void run() { try { TwitterUtils.sendTweet(prefs, getTweetMsg()); mTwitterHandler.post(mUpdateTwitterNotification); } catch (Exception ex) { ex.printStackTrace(); } } }; t.start(); } public class PrepareRequestTokenActivity extends Activity { final String TAG = getClass().getName(); private OAuthConsumer consumer; private OAuthProvider provider; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { this.consumer = new CommonsHttpOAuthConsumer( Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET); this.provider = new CommonsHttpOAuthProvider(Constants.REQUEST_URL, Constants.ACCESS_URL, Constants.AUTHORIZE_URL); } catch (Exception e) { Log.e(TAG, Error creating consumer / provider, e); } Log.i(TAG, Starting task to retrieve request token.); new OAuthRequestTokenTask(this, consumer, provider).execute(); } @Override public void onNewIntent(Intent intent) { super.onNewIntent(intent); SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(this); final Uri uri = intent.getData(); if (uri != null uri.getScheme().equals(Constants.OAUTH_CALLBACK_SCHEME)) { Log.i(TAG, Callback received : + uri); Log.i(TAG, Retrieving Access Token); new RetrieveAccessTokenTask(this, consumer, provider, prefs) .execute(uri); finish(); } } public class RetrieveAccessTokenTask extends AsyncTaskUri, Void, Void { private Context context; private OAuthProvider
[android-developers] Need help in twitter integration
Hi All, I am working on twittwer in tegration in android I am trying to post tweet on my twitter but i am getting error as Error during OAUth retrieve request token here is the followin code: tweet.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { if (TwitterUtils.isAuthenticated(prefs)) { sendTweet(); } else { Intent i = new Intent(getApplicationContext(), PrepareRequestTokenActivity.class); i.putExtra(tweet_msg, getTweetMsg()); startActivity(i); } } }); public void sendTweet() { Thread t = new Thread() { public void run() { try { TwitterUtils.sendTweet(prefs, getTweetMsg()); mTwitterHandler.post(mUpdateTwitterNotification); } catch (Exception ex) { ex.printStackTrace(); } } }; t.start(); } public class PrepareRequestTokenActivity extends Activity { final String TAG = getClass().getName(); private OAuthConsumer consumer; private OAuthProvider provider; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { this.consumer = new CommonsHttpOAuthConsumer( Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET); this.provider = new CommonsHttpOAuthProvider(Constants.REQUEST_URL, Constants.ACCESS_URL, Constants.AUTHORIZE_URL); } catch (Exception e) { Log.e(TAG, Error creating consumer / provider, e); } Log.i(TAG, Starting task to retrieve request token.); new OAuthRequestTokenTask(this, consumer, provider).execute(); } @Override public void onNewIntent(Intent intent) { super.onNewIntent(intent); SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(this); final Uri uri = intent.getData(); if (uri != null uri.getScheme().equals(Constants.OAUTH_CALLBACK_SCHEME)) { Log.i(TAG, Callback received : + uri); Log.i(TAG, Retrieving Access Token); new RetrieveAccessTokenTask(this, consumer, provider, prefs) .execute(uri); finish(); } } public class RetrieveAccessTokenTask extends AsyncTaskUri, Void, Void { private Context context; private OAuthProvider provider; private OAuthConsumer consumer; private SharedPreferences prefs; public RetrieveAccessTokenTask(Context context, OAuthConsumer consumer, OAuthProvider provider, SharedPreferences prefs) { this.context = context; this.consumer = consumer; this.provider = provider; this.prefs = prefs; } /** * Retrieve the oauth_verifier, and store the oauth and * oauth_token_secret for future API calls. */ @Override protected Void doInBackground(Uri... params) { final Uri uri = params[0]; final String oauth_verifier = uri .getQueryParameter(OAuth.OAUTH_VERIFIER); try { provider.retrieveAccessToken(consumer, oauth_verifier); final Editor edit = prefs.edit(); edit.putString(OAuth.OAUTH_TOKEN, consumer.getToken()); edit.putString(OAuth.OAUTH_TOKEN_SECRET, consumer.getTokenSecret()); edit.commit(); String token = prefs.getString(OAuth.OAUTH_TOKEN, ); String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, ); consumer.setTokenWithSecret(token, secret); context.startActivity(new Intent(context, AndroidTwitterSample.class)); executeAfterAccessTokenRetrieval(); Log.i(TAG, OAuth - Access Token Retrieved); } catch (Exception e) { Log.e(TAG, OAuth - Access Token Retrieval Error, e); } return null; } private void executeAfterAccessTokenRetrieval() { String msg = getIntent().getExtras().getString(tweet_msg); try { TwitterUtils.sendTweet(prefs, msg); } catch (Exception e) { Log.e(TAG, OAuth - Error sending to Twitter, e); } } } } please any one help me in solving this problem Thanks Naveen. -- 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
Re: [android-developers] need help on text rotation
hi jim, Thanks for replay my problem is to change the angle of text on key code event the text should be changed either counter clock wise or anti clock wise. i need help on changing the angle of text dynamically in android will please help me any one On Wed, Jan 4, 2012 at 11:35 AM, Jim Graham spooky1...@gmail.com wrote: On Wed, Jan 04, 2012 at 11:02:31AM +0530, chowdary nani wrote: I need help on rotating the text to certain angle on key code events in android will please help me anyone. We can't right now, because you haven't told us what the problem is. What have you done so far? What errors are you getting? Post the relevant portions of your code and the Logcat errors associated with the error. Were you expecting everyone to just guess? Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4)| DMR: So fsck was originally called spooky1...@gmail.com| something else. Running FreeBSD 7.0 | Q: What was it called? ICBM / Hurricane: | DMR: Well, the second letter was different. 30.44406N 86.59909W |-- Dennis M. Ritchie, Usenix, June 1998. Android Apps Listing at http://www.jstrack.org/barcodes.html -- 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 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
Re: [android-developers] need help on rotating text
Hi, Thank you Chandara shekar your link has helped me a lot Thanks for your help, Thanks for replay Thanks Naveen. On Tue, Jan 3, 2012 at 12:29 PM, Chandra Sekhar chandra4...@gmail.comwrote: On Tue, Jan 3, 2012 at 9:43 AM, chowdary nani naveenneeli...@gmail.comwrote: Hi All, I need help on rotating the text vertically on touch events in android will please help me any one. Thanks Naveen -- 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 See this link i think it will help u http://androidzoo.wordpress.com/2011/11/ -- -- 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 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] need help on text rotation
Hi All, I need help on rotating the text to certain angle on key code events in android will please help me any one. Thanks Naveen -- 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] need help on rotating text
Hi All, I need help on rotating the text vertically on touch events in android will please help me any one. Thanks Naveen -- 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] need some code
Hi All, I am writing code for text rotation i need text to be rotated for 90 degrees when i click on button How to solve above scenario using call back methods in ANDROID. Thanks Naveen . -- 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] need help on converting string to image
Hi all, i am currently working on converting text to bit map in android please help me on this code iam unable to fine where the error is i am doing with following code Bitmap testB; testB = Bitmap.createBitmap( edittext.getHeight(), edittext.getWidth(), Bitmap.Config.ARGB_); Canvas c = new Canvas(testB); edittext.layout(0, 0, edittext.getHeight(), edittext.getWidth()); c.drawText(0, 0, 0, paint); imview.setImageBitmap(testB); Thanks, Naveen. -- 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] help on zoom
Hi All, I need help on image zoom on touch when we select an image in gallery view image is displaying when i touch on the image image is to be zoom. Thanks, Naveen -- 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
Re: [android-developers] Need Help
Hi All, I need help on rotating the text in textview for 90 degrees please help me from anyone Thank you Naveeen -- 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
Re: [android-developers] Need Help
Hi, Thanks for replay will you please help me by brief example On Wed, Dec 28, 2011 at 12:47 PM, vandana toshniwal vandanatoshni...@gmail.com wrote: hi create a custom textview and override the onDraw method. the code is as follows... *protected* *void* onDraw(Canvas canvas) { //This saves off the matrix that the canvas applies to draws, so it can be restored later. canvas.save(); //We need to rotate around the center of our text //Otherwise it rotates around the origin. *float* py = *this*.getHeight()/2.0f; *float* px = *this*.getWidth()/2.0f; canvas.rotate(90, px, py); //draw the text with the matrix applied. *super*.onDraw(canvas); //restore the old matrix. canvas.restore(); } On 28 December 2011 12:42, chowdary nani naveenneeli...@gmail.com wrote: Hi All, I need help on rotating the text in textview for 90 degrees please help me from anyone Thank you Naveeen -- 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 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 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] Help on zooming and moving the image
Hi All, I need help Can we zoom or move the image which is set to image view in android if any one send me the code it will be very help full to me as it is important to me. Thanks, Naveen. -- 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
Re: [android-developers] Re: Help on Image Zoom and Rotate
On Fri, Dec 16, 2011 at 8:29 PM, skink psk...@gmail.com wrote: chowdary nani wrote: Hi All, I need help on Image rotate in android for the image which is selected in the gallery is displayed on the imageview but while i am trying to rotate the image it is rotating all the image with back ground and it is rotating the first image in gallery view I am developing using below code. public class Gadegets extends Activity { ImageAdapter imageadapter; private View view; Button clipart, text; private Integer[] mImageIds = { R.drawable.a_1, R.drawable.a_2, R.drawable.honeycomb }; private int position; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.gadgets); Button cloclrotate = (Button) findViewById(R.id.button_clock); cloclrotate.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub make(90); } }); Button anticlock = (Button) findViewById(R.id.button_anti); anticlock.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub make(-90); } }); final ImageView imview = (ImageView) findViewById(R.id.imageView1); Gallery g = (Gallery) view.findViewById(R.id.galle); imageadapter = new ImageAdapter(Gadegets.this); g.setAdapter(imageadapter); g.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView parent, View v, int position, long id) { imview.setImageResource(mImageIds[position]); // setContentView(new Zoom(this)); } }); public class ImageAdapter extends BaseAdapter { int mGalleryItemBackground; private Context mContext; public ImageAdapter(Context c) { mContext = c; TypedArray attr = mContext .obtainStyledAttributes(R.styleable.HelloGallery); mGalleryItemBackground = attr.getResourceId( R.styleable.HelloGallery_android_galleryItemBackground, 0); attr.recycle(); } public int getCount() { return mImageIds.length; } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { Log.d(eredtgdffhgh, rdrruyghtyrtytuuurt swathi naveen); ImageView imageView = new ImageView(mContext); imageView.setImageResource(mImageIds[position]); imageView.setLayoutParams(new Gallery.LayoutParams(100, 80)); imageView.setScaleType(ImageView.ScaleType.FIT_XY); imageView.setBackgroundResource(mGalleryItemBackground); return imageView; } } public void make(float x) { android.util.Log.i(INSIDE MAKE, inside make); LinearLayout linLayout = new LinearLayout(this); Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(), mImageIds[position]); int width = bitmapOrg.getWidth(); int height = bitmapOrg.getHeight(); int newWidth = 200; int newHeight = 200; float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; Matrix matrix = new Matrix(); matrix.postScale(scaleWidth, scaleHeight); matrix.postRotate(x); Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, width, height, matrix, true); BitmapDrawable bmd = new BitmapDrawable(resizedBitmap); //BitmapDrawable bmd = new BitmapDrawable(); ImageView imageView = new ImageView(this); imageView.setImageDrawable(bmd); imageView.setScaleType(ScaleType.CENTER); linLayout.addView(imageView, new LinearLayout.LayoutParams( LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); setContentView(linLayout); android.util.Log.i(GOING OUT MAKE, going out make); } } please help me i am unable to find where i am going wrong. Thanks naveen -- 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
Re: [android-developers] Re: pleasehelp me on below query
Hi, thanks for reply. I to do the same thing but image is not displaying.I can not understand how the image in sdcard is taken in to the application.Please help on this. On Tue, Dec 20, 2011 at 8:50 PM, Md.Fazla Rabbi OPU md.fazlara...@gmail.com wrote: Actually your problem is in your * imageInSD String. *Because this string takes the *id* of the image not the *path*. But the* *method *decodeFile *takes path of the image as a parameter that should be stored in sdcard.* *So first store the image into sdcard then refer the path*. Changeprivate final String imageInSD = R.drawable.honeycomb;* TO * private final String imageInSD = /sdcard/honeycomb.png;* Hope this will work. -- 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 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] Need Help
Hi All, Please send me sample code for displaying the mirror of image in android application. Thanks for your help. Thanks Naveen -- 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] pleasehelp me on below query
Hi All, I am writing the code for mirror image in android using below code. public class Reflection extends Activity { private final String imageInSD = R.drawable.honeycomb; CheckBox enableMirror; ImageView myImageView; Bitmap bitmap; int bmpWidth, bmpHeight; Matrix matrixMirrorY; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main1); Log.d(swathi, naveen); enableMirror = (CheckBox) findViewById(R.id.enablemirror); myImageView = (ImageView) findViewById(R.id.imageview); enableMirror .setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { // TODO Auto-generated method stub drawMatrix(); } }); bitmap = BitmapFactory.decodeFile(imageInSD); bmpWidth = bitmap.getWidth(); bmpHeight = bitmap.getHeight(); initMirrorMatrix(); drawMatrix(); } private void initMirrorMatrix() { float[] mirrorY = { -1, 0, 0, 0, 1, 0, 0, 0, 1 }; matrixMirrorY = new Matrix(); matrixMirrorY.setValues(mirrorY); } // private void drawMatrix() { if (enableMirror.isChecked()) { Matrix matrix = new Matrix(); matrix.postConcat(matrixMirrorY); Bitmap mirrorBitmap = Bitmap.createBitmap(bitmap, 0, 0, bmpWidth, bmpHeight, matrix, true); myImageView.setImageBitmap(mirrorBitmap); } else { myImageView.setImageBitmap(bitmap); } } } please help me i am unable to trace the error where i am getting Thanks Naveen. -- 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] Help on Image Zoom and Rotate
Hi All, I need help on Image zoom and Image rotate in android with in the same screen I am developing using below code. public class ImageRotateActivity extends Activity { /** Called when the activity is first created. */ private ImageView img; private Button rotate; private Button zoom; float degrees =0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); zoom=(Button)findViewById(R.id.button2); zoom.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub setContentView(new Zoom(this)); } }); rotate = (Button) findViewById(R.id.button1); rotate.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub setContentView(R.layout.main); make(degrees); } }); } public void make(float x){ android.util.Log.i(INSIDE MAKE, inside make); LinearLayout linLayout = new LinearLayout(this); // load the origial BitMap (500 x 500 px) Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(), R.drawable.honeycomb); int width = bitmapOrg.getWidth(); int height = bitmapOrg.getHeight(); int newWidth = 200; int newHeight = 200; // calculate the scale - in this case = 0.4f float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; // createa matrix for the manipulation Matrix matrix = new Matrix(); // resize the bit map matrix.postScale(scaleWidth, scaleHeight); // rotate the Bitmap matrix.postRotate(x); // recreate the new Bitmap Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, width, height, matrix, true); // make a Drawable from Bitmap to allow to set the BitMap // to the ImageView, ImageButton or what ever BitmapDrawable bmd = new BitmapDrawable(resizedBitmap); ImageView imageView = new ImageView(this); // set the Drawable on the ImageView imageView.setImageDrawable(bmd); // center the Image imageView.setScaleType(ScaleType.CENTER); // add ImageView to the Layout linLayout.addView(imageView, new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT ) ); // set LinearLayout as ContentView setContentView(linLayout); android.util.Log.i(GOING OUT MAKE, going out make); } public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode==KeyEvent.KEYCODE_DPAD_UP)// rotate clockwise // zoomControler+=10; { degrees=degrees+10; make(degrees); //make(10); android.util.Log.i(ONE,rotating clockwise by +String.valueOf(degrees)+ degrees); android.util.Log.i(DEGREES,current value +String.valueOf(degrees)+ degrees); } if(keyCode==KeyEvent.KEYCODE_DPAD_DOWN) // rotate anti-clockwise { degrees=degrees-10; make(degrees); //make(10); android.util.Log.i(TWO,rotating anti-clockwise by +String.valueOf(degrees)+ degrees); android.util.Log.i(DEGREES,current value +String.valueOf(degrees)+ degrees); } // invalidate(); return true; } } public class Zoom extends View { private Drawable image; private ImageView img; float degrees = 0; private int zoomControler = 20; public Zoom(Context context) { super(context); image = context.getResources().getDrawable(R.drawable.honeycomb); setFocusable(true); } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); // here u can control the width and height of the images this // line is very important image.setBounds((getWidth() / 2) - zoomControler, (getHeight() / 2) - zoomControler, (getWidth() / 2) + zoomControler, (getHeight() / 2) + zoomControler); image.draw(canvas); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT)// zoom in zoomControler += 10; if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) // zoom out zoomControler -= 10; if (zoomControler 10) zoomControler = 10; invalidate(); return true; } } Here any one i.e, either zoom or image rotation is getting well but when trying to use both getting error -- 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
Re: [android-developers] Help on Image Zoom and Rotate
I already tried.But no use.Please help . On Fri, Dec 16, 2011 at 7:33 PM, New Developer secur...@isscp.com wrote: Look at the setRotationX() setRotationY() and setScaleX() setScaleY() They sure make the work much easier On 12/16/2011 08:59 AM, chowdary nani wrote: Hi All, I need help on Image zoom and Image rotate in android with in the same screen I am developing using below code. public class ImageRotateActivity extends Activity { /** Called when the activity is first created. */ private ImageView img; private Button rotate; private Button zoom; float degrees =0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); zoom=(Button)findViewById(R.id.button2); zoom.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub setContentView(new Zoom(this)); } }); rotate = (Button) findViewById(R.id.button1); rotate.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub setContentView(R.layout.main); make(degrees); } }); } public void make(float x){ android.util.Log.i(INSIDE MAKE, inside make); LinearLayout linLayout = new LinearLayout(this); // load the origial BitMap (500 x 500 px) Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(), R.drawable.honeycomb); int width = bitmapOrg.getWidth(); int height = bitmapOrg.getHeight(); int newWidth = 200; int newHeight = 200; // calculate the scale - in this case = 0.4f float scaleWidth = ((float) newWidth) / width; float scaleHeight = ((float) newHeight) / height; // createa matrix for the manipulation Matrix matrix = new Matrix(); // resize the bit map matrix.postScale(scaleWidth, scaleHeight); // rotate the Bitmap matrix.postRotate(x); // recreate the new Bitmap Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0, width, height, matrix, true); // make a Drawable from Bitmap to allow to set the BitMap // to the ImageView, ImageButton or what ever BitmapDrawable bmd = new BitmapDrawable(resizedBitmap); ImageView imageView = new ImageView(this); // set the Drawable on the ImageView imageView.setImageDrawable(bmd); // center the Image imageView.setScaleType(ScaleType.CENTER); // add ImageView to the Layout linLayout.addView(imageView, new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT ) ); // set LinearLayout as ContentView setContentView(linLayout); android.util.Log.i(GOING OUT MAKE, going out make); } public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode==KeyEvent.KEYCODE_DPAD_UP)// rotate clockwise // zoomControler+=10; { degrees=degrees+10; make(degrees); //make(10); android.util.Log.i(ONE,rotating clockwise by +String.valueOf(degrees)+ degrees); android.util.Log.i(DEGREES,current value +String.valueOf(degrees)+ degrees); } if(keyCode==KeyEvent.KEYCODE_DPAD_DOWN) // rotate anti-clockwise { degrees=degrees-10; make(degrees); //make(10); android.util.Log.i(TWO,rotating anti-clockwise by +String.valueOf(degrees)+ degrees); android.util.Log.i(DEGREES,current value +String.valueOf(degrees)+ degrees); } // invalidate(); return true; } } public class Zoom extends View { private Drawable image; private ImageView img; float degrees = 0; private int zoomControler = 20; public Zoom(Context context) { super(context); image = context.getResources().getDrawable(R.drawable.honeycomb); setFocusable(true); } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); // here u can control the width and height of the images this // line is very important image.setBounds((getWidth() / 2) - zoomControler, (getHeight() / 2) - zoomControler, (getWidth() / 2) + zoomControler, (getHeight() / 2) + zoomControler); image.draw(canvas); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT)// zoom in zoomControler += 10; if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) // zoom out zoomControler -= 10; if (zoomControler 10) zoomControler = 10
[android-developers] Tabed pane Help
Hi All, In Tabedpane i have 2 tabs.I have to send data from one tab to another tab. Please help me how to do this in android. Thanks Naveen -- 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] chowdary nani wants to chat
--- chowdary nani wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-a08359cac-196896027d-aKDADk29gwFCImUiBkQ8M92cehM You'll need to click this link to be able to chat with chowdary nani. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with chowdary nani, visit: http://mail.google.com/mail/a-a08359cac-196896027d-aKDADk29gwFCImUiBkQ8M92cehM Gmail offers: - Instant messaging right inside Gmail - Powerful spam protection - Built-in search for finding your messages and a helpful way of organizing emails into conversations - No pop-up ads or untargeted banners - just text ads and related information that are relevant to the content of your messages All this, and its yours for free. But wait, there's more! By opening a Gmail account, you also get access to Google Talk, Google's instant messaging service: http://www.google.com/talk/ Google Talk offers: - Web-based chat that you can use anywhere, without a download - A contact list that's synchronized with your Gmail account - Free, high quality PC-to-PC voice calls when you download the Google Talk client We're working hard to add new features and make improvements, so we might also ask for your comments and suggestions periodically. We appreciate your help in making our products even better! Thanks, The Google Team To learn more about Gmail and Google Talk, visit: http://mail.google.com/mail/help/about.html http://www.google.com/talk/about.html (If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser). -- 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] Need Help
Hi All, In first activity i have 3 buttons with label 'RED ,BLUE and Green with back ground grey color. In the last of the window i have a button with label pick color. When i click on the pick color button ,new window opens which consists of redio buttons with lables RED,BLUE,GREEN. When i select color as RED Again previous window opens with highleting the red button with red color. How to solve above scenario using call back methods in ANDROID. Thanks Naveen -- 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] Help need on face book integration
Hi All, I need help on integrating face book into my android application and creating developers id in face book. Please help me on this. Thanks in advance. Thanks Naveen -- 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] Urgent Help required
Please how to integrate face book in android.I am trying to do it using fbconnection/api.jar but i am facing problem in loading the jar -- 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