[android-developers] Memory Overflow issue in Activity Android ON ORIENTATION CHANGES

2012-08-18 Thread nitin gupta
i useactivity android:name=.LoginOnline   android:configChanges=
orientation|keyboardHidden  in activity in manifest file.
and override method in activity TO PREVENT ACTIVITY RECREATE.
@Override
public void onConfigurationChanged(Configuration newConfig) {
String userr = user.getText().toString();
String passs = pass.getText().toString();
boolean rme = rememberme.isChecked();
setContentView(R.layout.loginonline);
login = (Button) findViewById(R.id.loginonline);
user = (EditText) findViewById(R.id.username);
pass = (EditText) findViewById(R.id.password);
rememberme = (CheckBox) findViewById(R.id.remeberme);
user.setText(userr);
pass.setText(passs);
rememberme.setChecked(rme);
login.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub

login(user.getText().toString(), pass.getText().toString());

if (rememberme.isChecked()) {
saveLoginDetails();
} else {
removeLoginDetails();
}

}
});

super.onConfigurationChanged(newConfig);

}

but still memory increase each time orientation changes WHYI AM 
USING TWO LAYOUT FOR DIFFERENT ORIENTATION.
please give me  a resolution..

-- 
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] List of views to change in layout

2012-08-18 Thread Narendra Singh Rathore
On Sat, Aug 18, 2012 at 2:20 AM, Budd buddf...@gmail.com wrote:

 Hi,

 I got a question about how to change to view dymaically.

 I have a empty FrameLayout in my activity.

 I want to do is every 10 seconds
 1) Remove all the view in the layout
 2) create new videoview or webview (depend on what kind of content in the
 array)
 3) Add it to the layout

 Any suggestion how i should do it to avoid memory leak or etc?


You can do something like this as follows:


 img=new ImageView(this);
img.setLayoutParams(new
inearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
img.setImageResource(R.drawable.logo);

 btn = (Button)findViewById(R.id.btn);

   btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
   linearLayout.removeAllViews();
if(ll.getChildAt(0)==null)
{
   linearLayout.addView(img);
}

}
});

I have done this on button click, you can do the similar using thread.

With Regards,
NSR

-- 
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] Obfuscating a database for in-app billing

2012-08-18 Thread William Ferguson
The PurchaseDabatase class in the Android in-app Billing example states 
that:
  You should use an obfuscator before storing any information to 
persistent storage.

OK, I understand the need but I can't find any example of how this 
could/should be done. Can someone point me in the right direction?

William

-- 
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] Tabbed Menu with Gallery-like Menu in one of the tab

2012-08-18 Thread Jeff Huang
the example given in the display-bitmaps seems to be broken.
having a runtime exception.

On Tuesday, August 14, 2012 3:30:24 PM UTC+8, Alexandros wrote:

 The problem is that you are doing network operations on the UI thread. 
 Most probable your application is not targeting the latest android version, 
 if you did android would have given you an error for this.
 You have to load the images from a thread and once they are downloaded you 
 will add them in your image view.
 The solution is here: 
 http://developer.android.com/training/displaying-bitmaps/index.html

 On Tuesday, August 14, 2012 6:50:23 AM UTC+3, Jeff Huang wrote:

 the problem should be coming from.

 public void setViewImage(ImageView v, String value) {
 super.setViewImage(v, value);
 try {
 v.setImageBitmap(BitmapFactory.decodeStream(new 
 URL(value).openConnection().getInputStream()));
 } catch (Exception e) {
 e.printStackTrace();
 }
 }

 but I can't seem to figure out why..

 MagouyaWare於 2012年8月8日星期三UTC+8上午5時13分12秒寫道:

 No one is going to download your code and look at it.  Figure out the 
 relevant parts and paste them here and then you have a better chance of 
 getting someone to help.

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Mon, Aug 6, 2012 at 9:23 AM, Jeff Huang jeff...@gmail.com wrote:

 First thing first I've attached all my code

 Design:
 Interface with 4 Tabs
 Under one of the tab contains a gallery like menu (fragment + gridview)
 gallery pictures are retrieve at runtime from the web.
 there is a correspond namelist to retrieve the pictures.

 Goal: 
 Create application that retrieves most of the content at runtime from 
 the internet.
 meaning a client-side app if possible

 ex. Alice, Bob, Cathy, Don ~string array
 pictures are retrieved from say http://www.friend.com/alic.pnge, 
 http://www.friend.com/bob.png etc etc.
 onclick of the avatar/picture of the person will trigger a new activity 
 (not yet implemented)

 Problem:
 even though the pictures loads correctly, however there seems to be a 
 huge lagging issue. (tested with 100 photos of of grand total size of 1mb)
 and whenever I scroll down the gallery it seems to reload the pictures.

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-d...@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] Re: LVL suddently stopped working - returns only timeouts

2012-08-18 Thread Pent
The official developer forum is supported by people who 'donate' their
time to do it, despite Google making other-worldly profits and Android
being one of their main projects.

The people who are supposed to answer questions are on a different,
unmentioned in any guide or documentation that I'm aware of, forum
because they like it better.

I'm sure that's approximately what you just wrote but I can't quite
get my head around it.

Pent

-- 
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] dynamically create groups within another group in android expandable listview

2012-08-18 Thread Krishna Veni


i have to developed one expandablelistview is successfully..now i wish to 
need expandable listview with in another expandablelistview..how is 
creating groups within another groups in android expandable listview 
...please help me..how is to do...

this is my code for creating 2 groups(orderinfo, customerinfo).

final LayoutInflater layoutInflater = (LayoutInflater) 
this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final ArrayListHashMapString, String headerData = new 
ArrayListHashMapString, String();

final HashMapString, String group1 = new HashMapString, String();
group1.put(NAME, OrderInfo);
headerData.add( group1 );

final HashMapString, String group2 = new HashMapString, String();
group2.put(NAME, CustomerInfo);
headerData.add( group2);

now i wish to need to implement the customerinfo within another 3 group is 
createdhow is to do..please give me sample 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

Re: [android-developers] My developer account has been canceled., Anybody knows the reason???

2012-08-18 Thread Fabien R
On 18/08/2012 07:33, julious raj wrote:
 Hi the_edge123,

 Thanks for your reply.,
 Currently i am not getting any mails from google.,
 some of my friends also faced this kind of issue.,

 Now i have only two ways
  1. try to register a new account
   
If you read carefully the message sent by google, you would not try that.

-- 
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] Tabbed Menu with Gallery-like Menu in one of the tab

2012-08-18 Thread Jeff Huang
the example given in the tutorial seems to be broken.

08-18 09:55:14.808: E/AndroidRuntime(742): java.lang.RuntimeException: 
Unable to start activity 
ComponentInfo{com.example.android.bitmapfun/com.example.android.bitmapfun.ui.ImageGridActivity}:
 
java.lang.NullPointerException


On Tuesday, August 14, 2012 3:30:24 PM UTC+8, Alexandros wrote:

 The problem is that you are doing network operations on the UI thread. 
 Most probable your application is not targeting the latest android version, 
 if you did android would have given you an error for this.
 You have to load the images from a thread and once they are downloaded you 
 will add them in your image view.
 The solution is here: 
 http://developer.android.com/training/displaying-bitmaps/index.html

 On Tuesday, August 14, 2012 6:50:23 AM UTC+3, Jeff Huang wrote:

 the problem should be coming from.

 public void setViewImage(ImageView v, String value) {
 super.setViewImage(v, value);
 try {
 v.setImageBitmap(BitmapFactory.decodeStream(new 
 URL(value).openConnection().getInputStream()));
 } catch (Exception e) {
 e.printStackTrace();
 }
 }

 but I can't seem to figure out why..

 MagouyaWare於 2012年8月8日星期三UTC+8上午5時13分12秒寫道:

 No one is going to download your code and look at it.  Figure out the 
 relevant parts and paste them here and then you have a better chance of 
 getting someone to help.

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Mon, Aug 6, 2012 at 9:23 AM, Jeff Huang jeff...@gmail.com wrote:

 First thing first I've attached all my code

 Design:
 Interface with 4 Tabs
 Under one of the tab contains a gallery like menu (fragment + gridview)
 gallery pictures are retrieve at runtime from the web.
 there is a correspond namelist to retrieve the pictures.

 Goal: 
 Create application that retrieves most of the content at runtime from 
 the internet.
 meaning a client-side app if possible

 ex. Alice, Bob, Cathy, Don ~string array
 pictures are retrieved from say http://www.friend.com/alic.pnge, 
 http://www.friend.com/bob.png etc etc.
 onclick of the avatar/picture of the person will trigger a new activity 
 (not yet implemented)

 Problem:
 even though the pictures loads correctly, however there seems to be a 
 huge lagging issue. (tested with 100 photos of of grand total size of 1mb)
 and whenever I scroll down the gallery it seems to reload the pictures.

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-d...@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] LVL service binding fails on ALLVIEW PC ALLDRO SPEED tablet

2012-08-18 Thread b0b


On Tuesday, 14 August 2012 23:10:38 UTC+2, Acubeware wrote:

 Thank you for your suggestion. I'll try this out if the user is willing 
 and post my findings.
  


Any news on this ? I have a few users with the same issue on el-cheapo ICS 
tablets... 

-- 
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] Obfuscating a database for in-app billing

2012-08-18 Thread Kostya Vasilyev
You obfuscate the values before storing them regular Android storage
mechanisms (shared preferences or a database). I believe there is an
example in the library.

In other words, don't take this to mean as a lower level obfuscation of
files used by these mechanisms, although you could certainly do that of you
wanted to. This would be easier to do with your own storage format that
uses a plain (although encrypted) file.
 18.08.2012 11:08 пользователь William Ferguson 
william.ferguson...@gmail.com написал:

 The PurchaseDabatase class in the Android in-app Billing example states
 that:
   You should use an obfuscator before storing any information to
 persistent storage.

 OK, I understand the need but I can't find any example of how this
 could/should be done. Can someone point me in the right direction?

 William

 --
 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] Obfuscating a database for in-app billing

2012-08-18 Thread Nikolay Elenkov
On Aug 18, 2012 8:21 PM, Kostya Vasilyev kmans...@gmail.com wrote:

 You obfuscate the values before storing them regular Android storage
mechanisms (shared preferences or a database). I believe there is an
example in the library.



You can also use obfuscated names for the tables and column names like 'a',
'b'' etc.

-- 
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] APK Multi-Tools Version 1.0.7 now released

2012-08-18 Thread Raziel23x
Version 1.0.7

Updated to next minor build number Updated Setup.bat Fixing Installing 
Framework-Res

Fixed Issue With 'apktool' is not recognized as an internal or external 
command,operable program or batch file.

Fixed Issue with Installing Framework-Res pointing to a incorrect folder that 
no longer exist

Fixed Issue when Running Installing Framework-Res scripts that the scripts will 
close after installing instead of going back to the menu.

Updated APKTOOL.JAR to 1.4.9

Added Custom AAPT that was built to work with JELLY BEAN

Fixed issues with setup

Made a few changes to the setup bat to fix alignment size and other misc issues

Fixed Spelling

Did some changes to see if I can fix the issue with The keep option to work 
with none system applications.

Trying to get batch optionmize to work

Replacing odt with a actual manual in html

Fixed Bug with KEEP Folder not exstracting for None System Applicaitons

Tweaked how the Signed and Unsigned files are compiled adding a small 
underscore between the recompiled file and the added prefix added by the scripts

Tweaked the option 11 for non system apks

I added the option to allow you to transfer the old key file over to the apk in 
case you did minor changes so be careful to test the APK files as some will 
need you to pick the unsigned option depending on how drastic the changes you 
made and forcing you to have to resign them

Renamed recompiled system files

Renamed the unsigned_ to signed_System_ since the system file changes the 
signature files are transfered since they are actually signed already instead 
of the misconception that has been going on for a while

Download it off the APK Multi-Tools website @ http://apkmultitool.com

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Obfuscating a database for in-app billing

2012-08-18 Thread William Ferguson
Thanks Nikolay, that makes sense.

Kostya, you mean obfuscate each field value independently (and yes I prefer 
to use a DB that writing my own file format). I haven't found any examples 
that do that. To which library are you referring? Have you got a URL to an 
example?

William

On Saturday, August 18, 2012 9:39:37 PM UTC+10, Nikolay Elenkov wrote:


 On Aug 18, 2012 8:21 PM, Kostya Vasilyev kman...@gmail.comjavascript: 
 wrote:
 
  You obfuscate the values before storing them regular Android storage 
 mechanisms (shared preferences or a database). I believe there is an 
 example in the library.
 
  

 You can also use obfuscated names for the tables and column names like 
 'a', 'b'' etc.
  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Memory Overflow issue in Activity Android ON ORIENTATION CHANGES

2012-08-18 Thread bob
Maybe because you are calling this:

super.onConfigurationChanged(newConfig);

?

On Saturday, August 18, 2012 1:42:12 AM UTC-5, nitin gupta wrote:

 i useactivity android:name=.LoginOnline   android:configChanges=
 orientation|keyboardHidden  in activity in manifest file.
 and override method in activity TO PREVENT ACTIVITY RECREATE.
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
 String userr = user.getText().toString();
 String passs = pass.getText().toString();
 boolean rme = rememberme.isChecked();
 setContentView(R.layout.loginonline);
 login = (Button) findViewById(R.id.loginonline);
 user = (EditText) findViewById(R.id.username);
 pass = (EditText) findViewById(R.id.password);
 rememberme = (CheckBox) findViewById(R.id.remeberme);
 user.setText(userr);
 pass.setText(passs);
 rememberme.setChecked(rme);
 login.setOnClickListener(new OnClickListener() {

 public void onClick(View v) {
 // TODO Auto-generated method stub

 login(user.getText().toString(), 
 pass.getText().toString());

 if (rememberme.isChecked()) {
 saveLoginDetails();
 } else {
 removeLoginDetails();
 }

 }
 });
 
 super.onConfigurationChanged(newConfig);
 
 }
 
 but still memory increase each time orientation changes WHYI AM 
 USING TWO LAYOUT FOR DIFFERENT ORIENTATION.
 please give me  a resolution..


-- 
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] Obfuscating a database for in-app billing

2012-08-18 Thread bob
 

Maybe use AES encryption on every field?

On Saturday, August 18, 2012 8:06:52 AM UTC-5, William Ferguson wrote:

 Thanks Nikolay, that makes sense.

 Kostya, you mean obfuscate each field value independently (and yes I 
 prefer to use a DB that writing my own file format). I haven't found any 
 examples that do that. To which library are you referring? Have you got a 
 URL to an example?

 William

 On Saturday, August 18, 2012 9:39:37 PM UTC+10, Nikolay Elenkov wrote:


 On Aug 18, 2012 8:21 PM, Kostya Vasilyev kman...@gmail.com wrote:
 
  You obfuscate the values before storing them regular Android storage 
 mechanisms (shared preferences or a database). I believe there is an 
 example in the library.
 
  

 You can also use obfuscated names for the tables and column names like 
 'a', 'b'' etc.
  


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: WHY can an app still not be changed from free to paid???

2012-08-18 Thread John Coryat
You can change a free app into a paid app using the in-app billing system. 
Offer a 5 or 10 day free trial, then present a payment dialog after the 
trial period runs out. It's the Freemium model and works well. 

It takes a bit of code to accomplish this but overall, it's a better model. 
You can offer subscriptions as well. With the Premium (paid app) model, 
you are forced into the buy-once-support-forever role. The only way to 
increase revenue is to accelerate installs. That's something that may be 
difficult or impossible. WIth the Freemium subscription method, you can 
increase revenue by keeping your install rate the same by having renewals 
of your app.

Something to think about.

-John Coryat 

On Thursday, August 16, 2012 7:40:06 PM UTC-5, stellan andersson wrote:

 Why is it that developers still can't choose to change a paid app to free 
 and then back to paid again? This is an absolutely insane stance by Google. 
 I'm sure it's not a technical issue as Googlers are probably smart enough 
 to figure that out. You (Google) are effectively denying developers an 
 important marketing tool. It should be up to us to set whatever price we 
 want and change it at will. I think most developers would agree with me.


-- 
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 do others handle action bar tabs that go off screen?

2012-08-18 Thread Larry Meadors
I have a simple sample app that sets up an action bar to use tabs.

I'm looking for a way to make it clear that there are more items
available, because when I start the app, it looks like this:
 - https://img.skitch.com/20120818-gpd9xm1f9qpxpgp6sh3bn6f6pu.png

Here's a screen shot of the tabs if you scroll over a bit:
 - https://img.skitch.com/20120818-gumrbb811x59xjd5hqn2h3kgqn.png

I guess when they touch Like this it scrolls over and Settings
(the last tab) becomes available, but I'm looking for a simpler way
for users to discover that tab.

Larry

-- 
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] How do others handle action bar tabs that go off screen?

2012-08-18 Thread Mark Murphy
AFAIK, there's not much you can do. The tabs are scrollable at the
pixel level IIRC, so it is entirely possible that the user will happen
to swipe such that there is no obvious clue that there are more tabs
to one side (or it might start that way due to an unlucky combination
of screen dimensions and tab contents).

Bear in mind that only in few situations will the tabs be tabs. Some
of the time, they will be converted into a drop-down, as if you had
chosen NAVIGATION_MODE_LIST instead of NAVIGATION_MODE_TABS.

On Sat, Aug 18, 2012 at 11:04 AM, Larry Meadors larry.mead...@gmail.com wrote:
 I have a simple sample app that sets up an action bar to use tabs.

 I'm looking for a way to make it clear that there are more items
 available, because when I start the app, it looks like this:
  - https://img.skitch.com/20120818-gpd9xm1f9qpxpgp6sh3bn6f6pu.png

 Here's a screen shot of the tabs if you scroll over a bit:
  - https://img.skitch.com/20120818-gumrbb811x59xjd5hqn2h3kgqn.png

 I guess when they touch Like this it scrolls over and Settings
 (the last tab) becomes available, but I'm looking for a simpler way
 for users to discover that tab.

 Larry

 --
 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



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 4.0 Available!

-- 
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] Obfuscating a database for in-app billing

2012-08-18 Thread Przemyslaw Wegrzyn

Take a look at Google Play licensing library, it is a good example of
AES-based obfuscation.

Search for AESObfuscator here
http://developer.android.com/guide/google/play/licensing/adding-licensing.html

BR,
Przemek


On 08/18/2012 03:06 PM, William Ferguson wrote:
 Thanks Nikolay, that makes sense.

 Kostya, you mean obfuscate each field value independently (and yes I
 prefer to use a DB that writing my own file format). I haven't found
 any examples that do that. To which library are you referring? Have
 you got a URL to an example?

 William

 On Saturday, August 18, 2012 9:39:37 PM UTC+10, Nikolay Elenkov wrote:


 On Aug 18, 2012 8:21 PM, Kostya Vasilyev kman...@gmail.com
 javascript: wrote:
 
  You obfuscate the values before storing them regular Android
 storage mechanisms (shared preferences or a database). I believe
 there is an example in the library.
 
 

 You can also use obfuscated names for the tables and column names
 like 'a', 'b'' etc.

 -- 
 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] Re: Creating a dialog with progressbar

2012-08-18 Thread |-NK-|


On Friday, August 17, 2012 7:20:39 PM UTC+5:30, bob wrote:

 Maybe like this:

 ProgressDialog dialog = ProgressDialog.show(this, Your Title, Put your 
 message here, true);

 On Friday, August 17, 2012 4:02:51 AM UTC-5, |-NK-| wrote:

 Hi,
 I am developing an application in which on one screen I need to call some 
 funcations that does some calculations and sends results at particular 
 interval.
  
 In between I need to show a progress bar that keeps on running untill I 
 get the final calculated result.
  
 Once I get the result I am navigating to another screen.
  
 Now what I need is that the progressbar should appear in another window 
 which will act as modal window and should appear above my screen.
  
 Is that possible?
  
 Thanks.



Hi bob,

thanks for the help.

I tried this way, however I want to know whether we can set various 
parameters such as the current progress value to 0, or minvalue, maxvalue 
before calling show.

Thanks.


 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to code for Wifi Direct on the android version 2.3

2012-08-18 Thread Jegadeesan M
check this link it may help 
http://android.grepsrc.com/xref/ics-mr1/development/samples/WiFiDirectServiceDiscovery/src/com/example/android/wifidirect/discovery/

On Thursday, 16 August 2012 22:28:53 UTC-7, Nirav wrote:

 I have noticed on the official Android blog that WiFi Direct APIs are 
 supported on googles phone which are having versions 4.0 or later. 
 Also I have seen the code to access WiFi Direct API. But I have doubt 
 that on some blogs people have written that some 2.3 version android 
 devices also support WiFi Direct. So same code we are writing for 4.0 
 or later , will work on the 2.3 version android devices which support 
 WiFi Direct. I have failed to find the code which is compatible to 
 android version 2.3 

 Again I have noticed ,Alternate solution for this is 
 AllJoyn (https://www.alljoyn.org/) , but don't know that is it the 
 right way to use WiFi Direct ? 

 Can anybody please help me ? 


-- 
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] Android Source Cross reference tools

2012-08-18 Thread Jegadeesan M
please check this link and update us  : http://android.grepsrc.com  

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Create 2 groups in expandable listview

2012-08-18 Thread Jegadeesan M

  try this  String[] child  
=getResources().getStringArray(R.array.your_array); 

On Wednesday, 15 August 2012 21:33:32 UTC-7, Krishna Veni wrote:

 In the above example directly inserted children values.like this
 *private* 
 Stringhttp://android.grepsrc.com/source/s?defs=Stringproject=ics-mr1[][] 
 childrenhttp://android.grepsrc.com/source/s?refs=childrenproject=ics-mr1= {

{ Arnold, Barry, Chuck, David },
{ Ace, Bandit, Cha-Cha, Deuce },
 { Fluffy, Snuggles },
 { Goldy, Bubbles }
 };

 But i wish to need the children value is my xml parsed value.how is to 
 do.please help me.


 On Wednesday, August 15, 2012 11:12:05 AM UTC+5:30, Jegadeesan M wrote:

 please check this link  
 http://android.grepsrc.com/xref/ics-mr1/development/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.java

 On Monday, 13 August 2012 23:26:20 UTC-7, Krishna Veni wrote:

 Hi I have tried to develop expandable listview in android 
 application.Now I have one doubts.How is creating 2 groups ion below my 
 code for separate child details?

 For Eg:

 Group name: OrderInfo,CustomerInfo. Childname(OrderInfo):payment_method. 
 Childname(CustomerInfo):name,email.

 How to do this?Please help me.

 this is my code:

  SimpleExpandableListAdapter expListAdapter =

 new SimpleExpandableListAdapter(

 this,

 

 createGroupList(),  // Creating group 
 List.

 R.layout.group_row,  

   // Group item layout XML.

 new String[] { OrderInfo,CustomerInfo},  // the 
 key of group item.

 new int[] { R.id.order,R.id.customer},

 

 // ID of each group item.-Data under the key goes 
 into this TextView.

 createChildList(),  // childData 
 describes second-level entries.

 R.layout.single_list_item,  

 

new String[] 
 {KEY_ARTIST,KEY_DURATION,KEY_SUBTOTAL,KEY_DISCOUNT,KEY_COUPON,KEY_COST},
  
  

new int[] { 
 R.id.payment_label,R.id.total_label,R.id.discount_label,R.id.discount_label,R.id.coupon_label,R.id.cost_label}//
  
 Keys in childData maps to display.



 );

 setListAdapter( expListAdapter );   // setting the 
 adapter in the list.

  

 }catch(Exception e){

 System.out.println(E +++  + e.getMessage());

 }

 }



 /* Creating the Hashmap for the row */

 @SuppressWarnings(unchecked)

 private List createGroupList() {

   ArrayList result = new ArrayList();

   for( int i = 0 ; i  1 ; ++i ) { // 15 groups

 HashMap m = new HashMap();

map.put( CustomerInfo,CustomerInfo); // the key 
 and it's value.

 m.put( OrderInfo, OrderInfo);

   

 result.add( m);

   }

   return (List)result;

   

 }

 

  


 /* creatin the HashMap for the children */

 @SuppressWarnings(unchecked)

 private List createChildList() {

  

 ArrayList result = new ArrayList();

 for( int i = 0 ; i  1 ; ++i ) { // this -15 is the number of 
 groups(Here it's fifteen)

   /* each group need each HashMap-Here for each group we have 3 
 subgroups */

   ArrayList secList = new ArrayList();

   for( int n = 0 ; n  1 ; n++ ) {

 HashMap child = new HashMap();

 Intent in = getIntent();

 String payment_method = in.getStringExtra(KEY_ARTIST);

 TextView lblPayment = (TextView) 
 findViewById(R.id.payment_label);

  ///  lblPayment.setText(payment_method);

int payment;

payment=1;



 

   

String s= getIntent().getStringExtra(payment_method);

String s1= getIntent().getStringExtra(total);

String s2= getIntent().getStringExtra(subtotal);

String s3= getIntent().getStringExtra(discount);

String s4= getIntent().getStringExtra(coupon_discount);

String s5= getIntent().getStringExtra(shipping_cost);


  child.put( KEY_ARTIST, s);

  child.put( KEY_DURATION, s1);

  child.put( KEY_SUBTOTAL, s2);

  child.put( KEY_DISCOUNT, s3);

  child.put( KEY_COUPON, s4);

  child.put( KEY_COST, s5);

 secList.add( child);

   }

  result.add( secList );

 }

 return result;

 }

 Here my above code is not worked.So please help me I have to change what 
 line.



-- 
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 

[android-developers] Re: List of views to change in layout

2012-08-18 Thread Jegadeesan M
You can do like this , 
  
   
   1. Use the list view instead of FrameLayout  
   2. add one list item as Framelayout. 
   3. Change data set and notify the list adapter   
   


On Friday, 17 August 2012 13:50:28 UTC-7, Budd wrote:

 Hi,

 I got a question about how to change to view dymaically.

 I have a empty FrameLayout in my activity.

 I want to do is every 10 seconds
 1) Remove all the view in the layout
 2) create new videoview or webview (depend on what kind of content in the 
 array)
 3) Add it to the layout

 Any suggestion how i should do it to avoid memory leak or etc?

 Thank you.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: onCreateContextMenu not getting called for EditText view in the landscapemode with softkeypad visibile

2012-08-18 Thread Jegadeesan M
check this http://android.grepsrc.com/search?q=ContextMenuproject=ics-mr1

On Friday, 17 August 2012 06:15:52 UTC-7, Bunty syed wrote:


 I have one edittext in the current view. I have registered context menu 
 for the edittext as below.

  et =(EditText) findViewById(R.id.editText11);
   registerForContextMenu(et);

 When no keypad is shown, I get callback in onCreateContextMenu method when 
 I long press any text in the edittext.( as shown in *editext1*.png 
 attachment).


 But When keypad is shown, I *dont *get any *callback *in 
 onCreateContextMenu method when i long press any text in the edittext.( as 
 shown in *edittextwithkeypad*.png  attachment).

 Please help...




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How the contact chosen by the user to place in a textview

2012-08-18 Thread Jegadeesan M
please check this example : 
http://android.grepsrc.com/xref/ics-mr1/apps/Contacts/tests/src/com/android/contacts/tests/quickcontact/QuickContactTestsActivity.java




On Friday, 17 August 2012 05:28:30 UTC-7, Sergey Mitugov wrote:

 Begining

 Intent pickIntent = new Intent(Intent.ACTION_PICK, 
 android.provider.ContactsContract.Contacts.CONTENT_URI);
 startActivityForResult(pickIntent, PICK_RESULT);


-- 
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] Obfuscating a database for in-app billing

2012-08-18 Thread William Ferguson
Thanks! Exactly what i was l looking for


On Sunday, August 19, 2012 1:19:12 AM UTC+10, Przemyslaw Wegrzyn wrote:
 Take a look at Google Play licensing library, it is a good example
   of AES-based obfuscation.
 
   
 
   Search for AESObfuscator here
   
   
 http://developer.android.com/guide/google/play/licensing/adding-licensing.html
 
   
 
   BR,
 
   Przemek
 
   
 
   
 
   On 08/18/2012 03:06 PM, William Ferguson wrote:
 
 
 Thanks Nikolay, that makes sense.
   
 
 
   
   
 Kostya, you mean obfuscate each field value independently
 (and yes I prefer to use a DB that writing my own file format).
 I haven't found any examples that do that. To which library are
 you referring? Have you got a URL to an example?
   
 
 
   
   
 William
 
 
 
 On Saturday, August 18, 2012 9:39:37 PM UTC+10, Nikolay Elenkov
 wrote:
 
   
 
 
 On Aug 18, 2012 8:21 PM, Kostya Vasilyev kman...@gmail.com
 wrote:
 
 
 
  You obfuscate the values before storing them regular
 Android storage mechanisms (shared preferences or a
 database). I believe there is an example in the library.
 
 
 
  
   
 You can also use obfuscated names for the tables
 and column names like 'a', 'b'' etc.
 
   
 
   
   -- 
 
   You received this message because you are subscribed to the Google
 
   Groups Android Developers group.
 
   To post to this group, send email to
   android-d...@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: InApp billing - always getting RESULT_ITEM_UNAVAILABLE

2012-08-18 Thread Przemyslaw Wegrzyn

Just in case someone else is struggling with it - now it works for me.
Redownloading new APKs, changing settings, etc didn't help.

What helped was removing the application submission altogether (i.e.
deactivating and deleting one and only APK version), and recreating
everything from scratch.
S frustrating...

BR,
Przemek


On 08/16/2012 02:12 PM, Przemyslaw Wegrzyn wrote:
 On 08/16/2012 12:19 PM, bharadwaj wrote:
 u have publish the items u have put in the developer account but no
 need to publish ur app.
 That's exactly what I've done.
 also need to mention required permisssions in your manifest.
 I have all the necessary permissions configured.
 My public key is OK, my test account is configured, device was
 factory-reseted...

 What makes me wonder: does it matter the account I used the upload
 belongs to 2 developer profiles (I have my own + I was added to mu
 customer's one, where I uploaded the test app).

 I'm gonna check this with the demo application today.

 the unique id which u have given in for each item should be same as
 the id u are sending to google while purchasing package.
 It is the same - purchase pop-up windows shows valid item
 title/descriptions, so it can see the item on the server side.

 I'm nearly sure it is some google-side quirk. Googling around I've found
 a few similar cases, e.g. here:
 http://stackoverflow.com/questions/11020587/in-app-billing-item-requested-not-available-for-purchase
 See the longest answer, point 4.

 BR,
 Przemek



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Creating a dialog with progressbar

2012-08-18 Thread bob
 

 ProgressDialog progressDialog = new ProgressDialog(this);

progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);

progressDialog.setMax(PROGRESS_MAX);

progressDialog.setMessage(Put your message here);

progressDialog.setCancelable(false);

progressDialog.incrementProgressBy(PROGRESS_INCREMENT);

On Saturday, August 18, 2012 12:07:58 PM UTC-5, |-NK-| wrote:



 On Friday, August 17, 2012 7:20:39 PM UTC+5:30, bob wrote:

 Maybe like this:

 ProgressDialog dialog = ProgressDialog.show(this, Your Title, Put your 
 message here, true);

 On Friday, August 17, 2012 4:02:51 AM UTC-5, |-NK-| wrote:

 Hi,
 I am developing an application in which on one screen I need to call 
 some funcations that does some calculations and sends results at particular 
 interval.
  
 In between I need to show a progress bar that keeps on running untill I 
 get the final calculated result.
  
 Once I get the result I am navigating to another screen.
  
 Now what I need is that the progressbar should appear in another window 
 which will act as modal window and should appear above my screen.
  
 Is that possible?
  
 Thanks.



 Hi bob,

 thanks for the help.

 I tried this way, however I want to know whether we can set various 
 parameters such as the current progress value to 0, or minvalue, maxvalue 
 before calling show.

 Thanks.


  


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en