Re: [android-developers] Samsung A50 sim get undetected when making calls

2019-10-10 Thread Jeff Moonlow
its a problem in hardware , please contact samsung service center

On Thu, Oct 10, 2019 at 5:58 AM Riya H  wrote:

>
> Hi,I bought Samsung A50 recently.one month ago it fell on swimming
> pool.But I removed the water from the phone and its working.But the issue
> is when making phone calls sim get undetected.Even when making whats app
> calls sim get undetected and it shows insert sim prompt. If hands-fee is
> plugged in, this issue is not there. Using data and sending messages all
> works fine.Only when making calls without hands-free sim get undetected.I
> dont understand where is the issue.I tried factory reset and hard reset
> still the issue is there.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/aa1603c6-0b0e-4184-8caf-f9364d597c37%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAOCxdCikz8OU-LON-GQW7dte4G3D_%3D%3DiFPakE487JAJV0ui8ug%40mail.gmail.com.


[android-developers] Pega developer Norfolk, VA long term

2019-10-08 Thread Jeff Moonlow
 

Pega developer

Norfolk, VA 

Open to visa’s

 

Required Skills:

4+ years of experience as a hands on Pega developer

Good Oracle/PL SQL, ETL skills

Strong understanding of Pega methodologies. Experience with full lifecycle 
Pega implementations on Pega 7.

Understanding of various Pega Rules - Ex: UI, Activities and Flows, 
Declaratives, Decision, Validation, Reports, Correspondences

Application Security concepts, Integration and error handling

Creating and executing Unit Test plans, defect identification and fixing, 
code deployment and migration

Experienced with Test Driven Development

PEGA performance tuning/optimization experience.

Understanding of OOP concepts (experience with Java, C#, or C++).

A Bachelor's Degree or equivalent experience

Experience working in agile delivery teams - preferably leveraging Scaled 
Agile Framework (SAFe)

Excellent communication skills 

Strong technical analysis and problem solving skills

 

Preferred Skills:

CSSA Version 7 certification (preferred)

Healthcare experience (preferred)

CPM or CPMHC Framework (preferred)

Currently using Smart Claims Engine (SCE), if candidate has exposure to SCE 
8.1 is a big plus

 

 

 

 

 

*"Please drop me an email, If I miss your call"*

 


*Thanks and Regards, **Ali Sarwar*
*ARAXIS SYSTEMS INC.*

2277 Rio Rancho Dr.,
Virginia Beach, VA-23456

Cell: *757-528-2695*

Email ID: a...@araxissystems.com

 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/59d6c5f0-de7c-4f0e-80f6-2000875b7134%40googlegroups.com.


[android-developers] Full stack developer Atlanta, Ga long term

2019-10-08 Thread Jeff Moonlow
 

Full stack developer with *strong Node js/ React js skills*

- Strong CSS skills with experience in Graph QL to perform frontend 
development

- Nice to have - Mongo experience

.  This one is a high priority, so hopefully you have one or more 
candidates available in the near term.

 

 

 

*"Please drop me an email, If I miss your call"*

 


*Thanks and Regards, **Ali Sarwar*
*ARAXIS SYSTEMS INC.*

2277 Rio Rancho Dr.,
Virginia Beach, VA-23456

Cell: *757-528-2695*

Email ID: a...@araxissystems.com

 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/dd4eecba-5a77-46a6-b187-ad8675816c58%40googlegroups.com.


[android-developers] ArrayList[0] through ArrayList[n-1] element being overwritten by ArrayList[n]

2017-08-07 Thread Jeff Biss
Somehow the name in the first ArrayList position (see Line 6) was 
overwritten with that in the second (see Line 13). Can anyone offer a 
reason as to what might be happening?

Refer to LogCat section for the numbers:

- Lines 2 and 3 show that the cursor has accessed the DB.

- Lines 4 thru 9 show that the names are retrieved from the DB and passed 
to ArrayLists.

- Lines 10 through 14 show the petNameList contents (see A) passed to the 
adapter (see B).

- Lines 15 through 18 show petNameList contents passed from MainActivity 
(see C).

- Lines 22 through 27 show that the first position of the ArrayList holds 
"qwerty".

- Lines 31 through 36 show that the second position of the ArrayList holds 
"qwerty".

I will keep experimenting to see if I can find out what happens and post it 
if I find the reason.

**LogCat:**

1. !--MainActivity: Starts here-!
2. DB has: 2 rows
3. cursor has: 2 rows
4. The following should be the same:  
5. name from cursor is: fert
6. petNameList[0] is: fert
7. The following should be the same:  
8. name from cursor is: qwerty
9. petNameList[1] is: qwerty
10. petNameList is: [com.example.jbiss.petminder.PetName@ea7cc11, 
com.example.jbiss.petminder.PetName@3c54176]
11. petNameList count is: 2
12. petNameList elements passed to mAdapter:  
13. petNameList[0] passed to the adapter constructor is: qwerty
14. petNameList[1] passed to the adapter constructor is: qwerty

15. made it to: SelectNameAdapter constructor
16. items is: [com.example.jbiss.petminder.PetName@ea7cc11, 
com.example.jbiss.petminder.PetName@3c54176]
17. ArrayList[0] passed to the adapter constructor is: qwerty
18. ArrayList[1] passed to the adapter constructor is: qwerty

19. made it to: onCreateViewHolder
20. made it to: ViewHolder
21. made it to: onBindViewHolder
22. position in ArrayList is: 0
23. mItems[0] (pointer) is: com.example.jbiss.petminder.PetName@ea7cc11
24. pNm (pointer) is): com.example.jbiss.petminder.PetName@ea7cc11
25. pNm (String ) is: qwerty
26. NOTE: item should equal mItems[0]
27. onBindViewHolder passed: item.getPetName() qwerty to ViewHolder
28. made it to: onCreateViewHolder

29. made it to: ViewHolder

30. made it to: onBindViewHolder
31. position in ArrayList is: 1
32. mItems[1] (pointer) is: com.example.jbiss.petminder.PetName@3c54176
33. pNm (pointer) is): com.example.jbiss.petminder.PetName@3c54176
34. pNm (String ) is: qwerty
35. NOTE: item should equal mItems[1]
36. onBindViewHolder passed: item.getPetName() qwerty to ViewHolder


**The relevant code in MainActivity:**

Log.d("!--MainActivity", "Starts here-!");

long numItems = mDbHelper.getPetCount();
Log.d("DB has", String.valueOf(numItems) + " rows");
if (numItems != 0) {
cursor = mDbHelper.getPetNames();
numItems = cursor.getCount();
Log.d("cursor has", String.valueOf(numItems) + " rows");
cursor.moveToFirst();

A)

for (int i = 0; i < numItems; i++) {
PetName name = new PetName(cursor.getString(PET_NAMES));
Log.d("The following should be the same", " ");
Log.d("name from cursor is", name.getPetName());
petNameList.add(name);
//the following is for troubleshooting, it gets the 
currently added petname
PN = petNameList.get(i);
pName = PN.getPetName();
Log.d("petNameList[" + i + "] is", pName);
cursor.moveToNext();
}
} else{
//otherwise, if no pet names exist int he DB, make the no pets 
found message visible
msgTv.setText(R.string.no_pets);
msgTv.setVisibility(View.VISIBLE);
}

B)

Log.d("petNameList is", String.valueOf(petNameList));
num = petNameList.size();
Log.d("petNameList count is", String.valueOf(num));
Log.d("petNameList elements passed to mAdapter", " ");
for(int j =0; j < num; j++){
PN = petNameList.get(j);
pName = PN.getPetName();
Log.d("petNameList[" + j + "] passed to the adapter constructor 
is", pName);
}
//setup the adapter and apply it to the RecyclerView
mAdapter = new SelectNameAdapter(this, petNameList);
mRecyclerView.setAdapter(mAdapter);


**Adapter code:**

private ArrayList mItems;
private Context mContext;

public SelectNameAdapter(Context context, ArrayList items) {
Log.d("made it to", "SelectNameAdapter constructor");
Log.d("items is", String.valueOf(items));
PetName PN;
String name;

C)

int num = items.size();
for(int j =0; j < num; j++){
PN = items.get(j);
name = PN.getPetName();
Log.d("ArrayList[" + j + "] passed to the adapter constructor 
is", 

[android-developers] Why is only the last item in an ArrayList shown in RecyclerView?

2017-08-03 Thread Jeff Biss
I am trying to learn how to use the RecyclerView and have found that only 
the last item in an ArrayList are displayed in both positions (there are 
only two) and can't figure out why. I have used LogCat to show what is 
going on so look to the LogCat output below.

- Lines 2 and 3 show that the cursor has accessed the DB.

- Lines 4 thru 7 show that the names are retrieved from the DB and passed 
to ArrayLists.

- Lines 8 and 10 show that the ArrayList petNameList is succefully passed 
to the adapter (as items).

- Line 17 shows what position in the ArrayList is being pointed to

- Line 18 shows what is stored in ArrayList[0] and line 19 shows what is 
now in "item". (I assume that what is shown is a pointer).

- Line 20 states that the values in lines 18 and 19 should be the same name 
and they are.

- Line 21 shows what onBindViewHolder has passed to the ViewHolder and it 
is NOT the first name stored in the DB or in the
  ArrayList. It should be "fert" (see line 5).

- Line 26 shows what is stored in ArrayList[1] and line 27 shows what is 
now in "item". (I assume that what is shown is a pointer).

- Line 28 states that the values in lines 26 and 27 should be the same name 
and they are.

- Line 29 shows what onBindViewHolder has passed to the ViewHolder and it 
is the name stored in the DB and in the
  ArrayList.

So, it appears that my "setText statement is passing an incorrect value, 
"qwerty", to the ViewHolder is wrong and I currently do not know why. I am 
researching this and will post an answer if I find it before someone ansers 
this question.

For clarity and space, I copied only what I think is the relevant 
MainActivity code below the LogCat output and the Adapter code below that. 
Each shows the Log.d() statements that should help with correlation.

**LogCat:**

1. !--MainActivity: Starts here-!
2. DB has: 2 rows
3. cursor has: 2 rows
4. name from cursor is: fert
5. pN arraylist[0] is: fert
6. name from cursor is: qwerty
7. pN arraylist[1] is: qwerty
8. petNameList is: [com.example.jbiss.petminder.PetName@fd82c44, 
   com.example.jbiss.petminder.PetName@d1fc12d]
9. made it to: SelectNameAdapter constructor
10. items is: [com.example.jbiss.petminder.PetName@fd82c44, 
com.example.jbiss.petminder.PetName@d1fc12d]
11. mAdapter count is: 2
12. pN arraylist[0] is: fert
13. pN arraylist[1] is: qwerty
14. made it to: onCreateViewHolder
15. made it to: ViewHolder
16. made it to: onBindViewHolder
17. position in ArrayList is: 0
18. mItems[0] is: com.example.jbiss.petminder.PetName@fd82c44
19. item is: com.example.jbiss.petminder.PetName@fd82c44
20. NOTE: item should equal mItems[0]
21. onBindViewHolder passed: item.getPetName() qwerty to ViewHolder
22. made it to: onCreateViewHolder
23. made it to: ViewHolder
24. made it to: onBindViewHolder
25. position in ArrayList is: 1
26. mItems[1] is: com.example.jbiss.petminder.PetName@d1fc12d
27. item is: com.example.jbiss.petminder.PetName@d1fc12d
28. NOTE: item should equal mItems[1]
29. onBindViewHolder passed: item.getPetName() qwerty to ViewHolder

**The relevant code in MainActivity:**

Log.d("!--MainActivity", "Starts here-!");

//populate the list with the names returned from the pet name DB
long numItems = mDbHelper.getPetCount();
Log.d("DB has", String.valueOf(numItems) + " rows");
if (numItems != 0) {
cursor = mDbHelper.getPetNames();
numItems = cursor.getCount();
Log.d("cursor has", String.valueOf(numItems) + " rows");
cursor.moveToFirst();
for (int i = 0; i < numItems; i++) {
PetName name = new PetName(cursor.getString(PET_NAMES));
Log.d("name from cursor is", name.getPetName());
petNameList.add(name);
PN = cursor.getString(PET_NAMES);
pN.add(PN);
Log.d("pN arraylist" + "[" + i + "] is", 
String.valueOf(PN));
cursor.moveToNext();
}
} else{
//otherwise, if no pet names exist int he DB, make the no pets 
found 
message visible
msgTv.setText(R.string.no_pets);
msgTv.setVisibility(View.VISIBLE);
}

//the following outputs URIs for the names meaning that the 
arraylist
//is a set of pointers to the PetName objects?
Log.d("petNameList is", String.valueOf(petNameList));
//setup the adapter and apply it to the RecyclerView
mAdapter = new SelectNameAdapter(this, petNameList);
mRecyclerView.setAdapter(mAdapter);
Log.d("mAdapter count is", String.valueOf(mAdapter.getItemCount()));

for(int i = 0; i < pN.size(); i++){
Log.d("pN arraylist" + "[" + i + "] is", 
String.valueOf(pN.get(i)));
}


**Adapter code:**

public class SelectNameAdapter extends 
  

[android-developers] Re: things BSP - open source?

2017-01-11 Thread Jeff Thompson
Yes, this is, indeed, exciting. However, only 3, low-performance, devkits 
are supported right now. This has got to change to where anyone can develop 
a BSP for their peculiar hardware, and soon. Until then, Things will just 
be an amusing little toy. I've got clients wanting this NOW.

On Wednesday, December 14, 2016 at 8:22:54 AM UTC-5, David Torres wrote:
>
> Hi,
>
> I've seen the news: Android SDK Things... amazing!
>
> But I have a doubt, are the BSPs open source? For example, I want to make 
> an improvement (or just for fun!) in a kernel driver, creating new features 
> in /proc entry, could I?
>
> In https://developer.android.com/things/sdk/drivers/index.html#benefits 
> it says: 
>
> *Note:* You cannot customize the behavior of device drivers in the Linux 
> kernel  or Hardware 
> Abstraction Layer 
>  (HAL) 
> to add new functionality to a device
>
> Is thus the source code closed to developers?
>
> Thanks in advance,
> David Torres
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/b9eb04a5-7196-4f98-8b1f-96dadb93b946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] ERR_UNKNOWN_URL_SCHEME after APK download

2016-01-28 Thread Jeff
How do I do the redirect ?

On Sunday, January 10, 2016, niks <niks...@gmail.com> wrote:

> Have you declared the redirect uri in the manifest?
>
>
>
> Τη Παρασκευή, 8 Ιανουαρίου 2016 - 2:44:39 μ.μ. UTC+2, ο χρήστης Jeff
> έγραψε:
>>
>> Hello,
>>
>> I'm trying to install an APk right after the download is completed. The APk 
>> gets open with the browser and throws ERR_UNKNOWN_URL_SCHEME. I'm assuming 
>> the the device thinks the downloaded file needs to be open with the browser 
>> instead of the android application installer.
>>
>>
>> package com.example.alien.myapplication;
>> import android.content.Context;import android.os.Build;import 
>> android.support.v7.app.AppCompatActivity;
>> import java.io.File;import java.io.FileInputStream;import 
>> java.io.FileNotFoundException;import java.io.IOException;
>> import org.json.JSONArray;import org.json.JSONException;import 
>> org.json.JSONObject;import android.app.DownloadManager;
>> import android.net.Uri;import android.os.Bundle;import 
>> android.os.Environment;import android.os.ParcelFileDescriptor;import 
>> android.app.Activity;import android.app.DownloadManager;import 
>> android.app.DownloadManager.Query;import 
>> android.content.BroadcastReceiver;import android.content.Context;import 
>> android.content.Intent;import android.content.IntentFilter;import 
>> android.database.Cursor;import android.view.Gravity;import 
>> android.view.Menu;import android.view.View;import 
>> android.view.View.OnClickListener;import android.widget.Button;import 
>> android.widget.TextView;import android.widget.Toast;
>>
>> public class MainActivity extends AppCompatActivity implements 
>> View.OnClickListener {
>> private DownloadManager downloadManager;private long downloadReference;
>> @Overridepublic void onCreate(Bundle savedInstanceState) {
>> super.onCreate(savedInstanceState);
>> setContentView(R.layout.activity_main);
>>
>> //start download button
>> Button startDownload = (Button) findViewById(R.id.startDownload);
>> startDownload.setOnClickListener(this);
>>
>> //set filter to only when download is complete and register broadcast 
>> receiver
>> IntentFilter filter = new 
>> IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE);
>> registerReceiver(downloadReceiver, filter);}
>> public void onClick(View v) {
>> System.out.println(v);
>>
>> switch (v.getId()) {
>>
>> //start the download process
>> case R.id.startDownload:
>>
>> downloadManager = (DownloadManager) 
>> getSystemService(DOWNLOAD_SERVICE);
>> Uri Download_Uri = Uri.parse("http://45.63.4.194/es.apk;);
>> DownloadManager.Request request = new 
>> DownloadManager.Request(Download_Uri);
>>
>> //Set a description of this download, to be displayed in 
>> notifications (if enabled)
>> request.setDescription("Android Data download using 
>> DownloadManager.");
>> //Set the local destination for the downloaded file to a path 
>> within the application's external files directory
>> request.setDestinationInExternalFilesDir(this, null, "es.apk");
>>
>> //Enqueue a new download and same the referenceId
>> downloadReference = downloadManager.enqueue(request);
>> break;
>> }}
>> private BroadcastReceiver downloadReceiver = new BroadcastReceiver() {
>>
>> @Override
>> public void onReceive(Context context, Intent intent) {
>> long referenceId = 
>> intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
>> if(downloadReference == referenceId) {
>>
>> DownloadManager dm = (DownloadManager) 
>> getSystemService(DOWNLOAD_SERVICE);
>> intent = new Intent(Intent.ACTION_VIEW);
>>
>>
>> intent.setDataAndType(dm.getUriForDownloadedFile(referenceId),
>> dm.getMimeTypeForDownloadedFile(referenceId));
>> startActivity(intent);
>>
>> }
>> }};}
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/JsubnhbVGjY/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com
> <javascript:_e(%7

[android-developers] ERR_UNKNOWN_URL_SCHEME after APK download

2016-01-08 Thread Jeff


Hello,

I'm trying to install an APk right after the download is completed. The APk 
gets open with the browser and throws ERR_UNKNOWN_URL_SCHEME. I'm assuming the 
the device thinks the downloaded file needs to be open with the browser instead 
of the android application installer.


package com.example.alien.myapplication;
import android.content.Context;import android.os.Build;import 
android.support.v7.app.AppCompatActivity;
import java.io.File;import java.io.FileInputStream;import 
java.io.FileNotFoundException;import java.io.IOException;
import org.json.JSONArray;import org.json.JSONException;import 
org.json.JSONObject;import android.app.DownloadManager;
import android.net.Uri;import android.os.Bundle;import 
android.os.Environment;import android.os.ParcelFileDescriptor;import 
android.app.Activity;import android.app.DownloadManager;import 
android.app.DownloadManager.Query;import 
android.content.BroadcastReceiver;import android.content.Context;import 
android.content.Intent;import android.content.IntentFilter;import 
android.database.Cursor;import android.view.Gravity;import 
android.view.Menu;import android.view.View;import 
android.view.View.OnClickListener;import android.widget.Button;import 
android.widget.TextView;import android.widget.Toast;

public class MainActivity extends AppCompatActivity implements 
View.OnClickListener {
private DownloadManager downloadManager;private long downloadReference;
@Overridepublic void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

//start download button
Button startDownload = (Button) findViewById(R.id.startDownload);
startDownload.setOnClickListener(this);

//set filter to only when download is complete and register broadcast 
receiver
IntentFilter filter = new 
IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE);
registerReceiver(downloadReceiver, filter);}
public void onClick(View v) {
System.out.println(v);

switch (v.getId()) {

//start the download process
case R.id.startDownload:

downloadManager = (DownloadManager) 
getSystemService(DOWNLOAD_SERVICE);
Uri Download_Uri = Uri.parse("http://45.63.4.194/es.apk;);
DownloadManager.Request request = new 
DownloadManager.Request(Download_Uri);

//Set a description of this download, to be displayed in 
notifications (if enabled)
request.setDescription("Android Data download using 
DownloadManager.");
//Set the local destination for the downloaded file to a path 
within the application's external files directory
request.setDestinationInExternalFilesDir(this, null, "es.apk");

//Enqueue a new download and same the referenceId
downloadReference = downloadManager.enqueue(request);
break;
}}
private BroadcastReceiver downloadReceiver = new BroadcastReceiver() {

@Override
public void onReceive(Context context, Intent intent) {
long referenceId = 
intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
if(downloadReference == referenceId) {

DownloadManager dm = (DownloadManager) 
getSystemService(DOWNLOAD_SERVICE);
intent = new Intent(Intent.ACTION_VIEW);


intent.setDataAndType(dm.getUriForDownloadedFile(referenceId),
dm.getMimeTypeForDownloadedFile(referenceId));
startActivity(intent);

}
}};}

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/12abf589-ae2d-4904-bc5f-f941c5fdb119%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to use TLS 1.1 from Android 2.2

2015-12-17 Thread Jeff Archer
My app running on Android 2.2 which cannot be updated needs to use TLS 1.1 
to access a secure server. Any suggestions would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/d8f9deb6-2891-4cf5-b044-f6a3d8df0481%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Google Play Services adds nearly 10,000 methods!

2014-03-25 Thread Jeff Campbell
The latest version and the Google Play Services (4.3) now adds about 2,500 
more methods (since 4.2)!!  (Adding Google Play Services to your project 
will add about 14,000 methods to your app) seems to be getting worse 
and worse!

On Friday, February 7, 2014 2:14:50 PM UTC-7, Jeff Campbell wrote:

 We have an app that depends on a lot of libraries, and recently we wanted 
 to integrate Google Maps into our application.  We learned that we would 
 have to add the following dependency to our app:

 compile 'com.google.android.gms:play-services:4.1.32'

 Before adding this dependeny, our app had about a 40k method count.  After 
 adding this dependency our method count jumped to about 50k (about 10k 
 methods added to our apk!).  And, it seems that with every new version of 
 this dependency it grows more and more (we noticed about a 2k growth in the 
 last update).

 I know that this dependency contains a LOT of different types of services 
 which include things we don't even use (which all contribute to the 10k 
 method count).  I know that I can use Proguard to strip out un-needed 
 methods, but in a development environment this just slows down build time, 
 and can make debugging issues difficult.

 Could the Google Play Services be divided into seperate aar projects? 
  Example:

 play-services-core (required by all... assuming that there is some shared 
 code)
 play-services-maps
 play-services-games
 play-services-ads
 play-services-plus
 play-services-wallet
 etc

 Doing this would reduce the risk of apps hitting the 65k method limit cap 
 (seems crazy that a Google library takes 15% of the 65k limit of any single 
 app)

 Thanks,
 Jeff




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


[android-developers] Google Play Services adds nearly 10,000 methods!

2014-02-07 Thread Jeff Campbell
We have an app that depends on a lot of libraries, and recently we wanted 
to integrate Google Maps into our application.  We learned that we would 
have to add the following dependency to our app:

compile 'com.google.android.gms:play-services:4.1.32'

Before adding this dependeny, our app had about a 40k method count.  After 
adding this dependency our method count jumped to about 50k (about 10k 
methods added to our apk!).  And, it seems that with every new version of 
this dependency it grows more and more (we noticed about a 2k growth in the 
last update).

I know that this dependency contains a LOT of different types of services 
which include things we don't even use (which all contribute to the 10k 
method count).  I know that I can use Proguard to strip out un-needed 
methods, but in a development environment this just slows down build time, 
and can make debugging issues difficult.

Could the Google Play Services be divided into seperate aar projects? 
 Example:

play-services-core (required by all... assuming that there is some shared 
code)
play-services-maps
play-services-games
play-services-ads
play-services-plus
play-services-wallet
etc

Doing this would reduce the risk of apps hitting the 65k method limit cap 
(seems crazy that a Google library takes 15% of the 65k limit of any single 
app)

Thanks,
Jeff


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


Re: [android-developers] Using ACTION_OPEN_DOCUMENT for editing files

2014-01-30 Thread Jeff Sharkey
Yep, you're right that checking FLAG_SUPPORTS_WRITE is the best way to
check if a write is allowed.

If you're really looking to focus on writing data, then
ACTION_CREATE_DOCUMENT might be a better fit, since it also lets the user
select an existing file, and it filters to only allow selection of
documents that have FLAG_SUPPORTS_WRITE set.

I'm thinking that allowing an app to request filtering of read-only
documents during a OPEN_DOCUMENT request would lead to user confusion
because of the inconsistency between apps.  (For example, a user would
still expect to open a read-only document for viewing purposes.)  If a user
then tried saving changes to a read-only document, it makes sense for the
app to use CREATE_DOCUMENT to ask them to save the modifications somewhere
else.

Hope this helps.  :)

j


On Wed, Jan 1, 2014 at 9:05 PM, Dave Smith dasmith1...@gmail.com wrote:

 As far as I can tell from the documentation and testing with the new
 Storage Access Framework and Intent.ACTION_OPEN_DOCUMENT, there doesn't
 seem to be a way (via an extra or otherwise) to pass with the Intent
 request to open a document to only return documents from providers that
 support writing (i.e. have FLAG_SUPPORTS_WRITE set).  Instead, we are
 forced to check a document selection made by the user (via a metadata
 query) to determine if the document supports write before we attempt to
 open an OutputStream or ParcelFileDescriptor in w mode.  Is this correct,
 or have I overlooked something?

 This seems to be a large missing piece in the new Storage Access Framework
 when attempting to allow a user to open an existing document to be edited
 as it forces the user to make a selection first, then have us check if they
 can write, throw and error if they cannot, and force them to pick again.
  Furthermore, we cannot say that it is uncommon for documents providers not
 to support writing, because even the system media documents provider (i.e.
 the source for images/videos) does not support write and will throw and
 IllegalArgumentException (Media is read-only) when one attempts to write
 to one of its files (as an image editing app, the most common example used
 in the docs, would attempt to do).  Is there a proper method with the new
 SAF of limiting selections to writable providers only?

 Feedback appreciated for anything I may have missed here.  As it stands,
 suggesting that developers use ACTION_OPEN_DOCUMENT for in-place editing
 doesn't seem like a viable approach.

 Dave Smith
 @devuwired

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




-- 
Jeff Sharkey
jshar...@android.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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: How to catch android.intent.action.MEDIA_MOUNTED

2013-06-09 Thread Jeff Gonzales
Could it be device dependent?  Does your dynamic receiver pick it up at
boot time or just later instances?
On Jun 9, 2013 5:48 AM, Pent supp...@apps.dinglisch.net wrote:

  I tried that.  It didn't seem to work.  Have you ever registered for this
  dynamically?

 I only use it dynamically.

   If it works for you, what other problem do you think it could
  be?

 Maybe another app is setting higher priority on it and aborting ?
 Can't remember whether MEDIA_MOUNTED is an ordered broadcast or not.

  I am registering from a Service so perhaps it doesn't work the same as
  registering from within an Activity?

 I only use it from a Service too.

 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
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/RQhgsWCy4Ek/unsubscribe?hl=en
 .
 To unsubscribe from this group and all its topics, send an email to
 android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




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




Re: [android-developers] Re: How to catch android.intent.action.MEDIA_MOUNTED

2013-06-08 Thread Jeff Gonzales
I tried that.  It didn't seem to work.  Have you ever registered for this
dynamically?  If it works for you, what other problem do you think it could
be?  I am registering from a Service so perhaps it doesn't work the same as
registering from within an Activity?


On Sat, Jun 8, 2013 at 2:02 AM, Pent supp...@apps.dinglisch.net wrote:

  The problem I have is that I cannot seem to
  catch android.intent.action.MEDIA_MOUNTED via a dynamically-registered
  receiver.

 You might need to do this:

 intentFilter.addDataScheme( file );

 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
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups Android Developers group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/android-developers/RQhgsWCy4Ek/unsubscribe?hl=en
 .
 To unsubscribe from this group and all its topics, send an email to
 android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




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




Re: [android-developers] Re: MediaPlayer suddenly stopped working in Android 4.2

2013-02-20 Thread Jeff Sharkey
Starting in Android 4.2, processes may have different views of the
filesystem depending on which user they're running as.  For example,
/sdcard/foo.mp3 could refer to different files for different users.

To correctly disambiguate filesystem paths, you'll need to open the
file in your app process and pass the FileDescriptor to the
mediaserver (which is shared between all users on a device).
Something like this should work:

MediaPlayer player;
FileInputStream fis = new FileInputStream(myFile);
try {
player.setDataSource(fis.getFD());
} finally {
fis.close();
}

It sounds like the setDataSource(String path) method needs to be
fixed; tracking in 7962739.

j

On Fri, Feb 15, 2013 at 8:43 AM, Brill Pappin br...@pappin.ca wrote:
 So I've now tested many different ways to try and figure this out and I need
 to reset the code (as I've introduced some silly errors).
 That error is most definitely a path problem which I need to retest and make
 sure I didn't introduce with my own hacking :)

 I *do* know that what was working in 4.1.1 does not work in 4.2.1.

 FYI - I'm also now seeing error 19, which is Error due to general port
 processing whatever that means.

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





--
Jeff Sharkey
jshar...@android.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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Tomcat creating new HTTP jsessionid for each page on Android browser for Android versions 3.x and lower after switching from HTTPS to HTTP

2012-12-10 Thread jeff
Platform: Windows 2008 R2  
Web Servers: IIS 7.5, Tomcat 5.5


I have a JSP website which uses login-form authentication, via a custom 
servlet.  Below is the order of how login proceeds:

Login (SSL) - Auth (SSL) - Intermediary Page 1 (SSL) - Intermediary Page 
2 (non-SSL) - Intermediary Page 3 (non-SSL) - Homepage (non-SSL).

Now, this process works just fine in all major desktop browsers, iOS, and 
Android 4.x.  However, **I am experiencing problems with Android 3.x and 
lower.  When I switch over from HTTPS to HTTP, Tomcat creates a new HTTP 
jsessionid for each page.**

Why is this a problem?  Because the HTTP session variables are lost when 
simply navigating to another HTTP page.  It seems that swtiching from HTTPS 
to HTTP causes Tomcat to keep creating a new HTTP session for these older 
versions of Android.

I tried passing jsessionid in the url from Intermediary Page 2 to 
Intermediary Page 3, which works as long as I do it for every single page 
the user accesses thereafter and that's simply not going to cut it, since 
there are many, many, many JSP pages this website manages.  In other words, 
I have to pass the jsession via URL to the Homepage, in order to maintain 
the HTTP session.

I don't know what to do, honestly.  I don't understand why Tomcat is 
creating new HTTP sessions and thus losing any and all session variables 
which were set previously in HTTP space.

Let me clarify that I'm not talking about maintaining sessions from HTTPS 
to HTTP.  The problem here is AFTER the user is redirected to HTTP space, 
where Tomcat creates new sessions for each and every page accessed in HTTP 
space, instead of maintaining the one HTTP session.

Does anyone have any solutions, as to why Android 3.x and lower are 
affected and how to resolve it?  Has anyone ever had this problem with the 
older Android versions?

Thank you.

**UPDATE**

I have confirmed that the request Header, Connection:keep-alive, does NOT 
appear for Android 3.x and lower.  This may be the reason why Tomcat is 
destroying and creating a new JSESSIONID.  But the problem is IIS 7.5 has 
connection:keep-alive enabled, although I think that's specifically for the 
response Header.  And, besides, Connection:keep-alive appears for all the 
other platforms and browsers that work.  So, for whatever reason, Android 
3.x and lower doesn't support Connection:keep-alive or there's an issue 
with how IIS 7.5 and Tomcat 5.5.  I'm just not sure.

-- 
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] Error replacing two fragments with scrollviews

2012-11-08 Thread Jeff Tycz
I have 2 fragments and both have`Scrollviews in them, I make a selection 
from a ListView and that replaces the first fragment with the other 
fragment that has the scrollview. 

The problem is that when I try to replace the fragment with the new one I 
get an error saying ScrollView can only contain one direct child which it 
does, it has one RelativeLayout which holds all the content.

If i take the ScrollView out of the first fragments view I do not get the 
error and the fragment gets replaced fine but I need the scrollview in the 
first fragment.

What is causing this issue, does replacing a fragment not remove the view 
fully?

StackTrace:

11-01 18:45:00.895: E/AndroidRuntime(3833): FATAL EXCEPTION: main
11-01 18:45:00.895: E/AndroidRuntime(3833): 
java.lang.IllegalStateException: ScrollView can host only one direct child
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.widget.ScrollView.addView(ScrollView.java:229)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.app.FragmentManagerImpl.moveToState(FragmentManager.java:840)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1035)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.app.BackStackRecord.run(BackStackRecord.java:635)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1397)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.app.FragmentManagerImpl$1.run(FragmentManager.java:426)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.os.Handler.handleCallback(Handler.java:615)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.os.Handler.dispatchMessage(Handler.java:92)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.os.Looper.loop(Looper.java:137)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
android.app.ActivityThread.main(ActivityThread.java:4745)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
java.lang.reflect.Method.invokeNative(Native Method)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
java.lang.reflect.Method.invoke(Method.java:511)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-01 18:45:00.895: E/AndroidRuntime(3833): at 
dalvik.system.NativeStart.main(Native Method)

*xml that holds the fragments*

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=match_parent
android:layout_height=match_parent 
android:orientation=horizontal


fragment
android:id=@+id/frameOne
android:name=com.tyczj.bowling.BowlersListFragment
android:layout_width=300dp
android:layout_height=match_parent
android:background=@drawable/list_background_holo /

fragment android:name=com.tyczj.bowling.BowlerEntryFrag
android:id=@+id/frameTwo
android:layout_height=match_parent
android:layout_width=fill_parent/


/LinearLayout

*First fragment with the scrollview*
*
*
?xml version=1.0 encoding=utf-8?
ScrollView xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=match_parent
android:layout_height=match_parent
android:background=@drawable/wood_floor 

RelativeLayout android:layout_width=match_parent
android:layout_height=wrap_content

TextView
   android:id=@+id/textView2
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:layout_marginLeft=40dp
   android:layout_marginTop=30dp
   android:text=Add Bowler
   android:textAppearance=?android:attr/textAppearanceLarge
   android:textColor=#33b5e5
   android:textSize=40dp /

   FrameLayout
   android:id=@+id/line
   android:layout_width=fill_parent
   android:layout_height=3dp
   android:layout_alignParentLeft=true
   android:layout_below=@+id/textView2
   android:layout_marginLeft=20dp
   android:layout_marginRight=20dp
   android:layout_marginTop=8dp
   android:background=@drawable/ab_solid_custom_blue_inverse_holo 

   /FrameLayout
   
   TextView
   android:id=@+id/textView1
   android:layout_width=wrap_content
   android:layout_height=wrap_content
   android:layout_alignLeft=@+id/line
   android:layout_below=@+id/line
   android:layout_marginTop=20dp
   android:text=@string/bNameTV
   android:textAppearance=?android:attr/textAppearanceMedium /
   

   EditText
   android:id=@+id/editText1
   android:layout_width=fill_parent
   android:layout_height=wrap_content
   

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

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

2012-08-13 Thread Jeff Huang
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.comjavascript:
  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.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 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: Goiogle Play - Dev Console not updating since July 25

2012-07-29 Thread Jeff Davies
Are you deliberately mischaracterizing my comment? I posted the date. Since
I've been following my apps on GPlay I have never seen it miss a single
day. The fact that it did miss 2 full days is remarkable.

On Sat, Jul 28, 2012 at 11:29 PM, Zsolt Vasvari zvasv...@gmail.com wrote:

 It skipped one day, the 26th.  Back on 27th.  No big deal, the OP makes it
 sounds like it hasn't updated for weeks.


 On Sunday, July 29, 2012 1:34:53 AM UTC+8, FiltrSoft wrote:

 sorry, meant hasn't

 On Saturday, July 28, 2012 12:00:46 PM UTC-4, Kaptkaos wrote:

 I was wondering if anyone else was seeing this. When I check my dev
 console there are now stats for my apps after July 25. Is there a problem
 with Google Play or did I miss a memo? 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


-- 
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 app using webview causing The page cannot be displayed because an internal server error has occurred(Win/Tomcat)

2012-06-18 Thread jeff
We have an android app using webview to display a page called
login.jsp.  This same page authenticates a user, via a servlet, and
forwards them to another page called index.jsp.  It is in the
index.jsp page where we get an error message that reads:

The page cannot be displayed because an internal server error has
occurred

(We are running Windows 2008 R2 Standard SP1/Apache Tomcat 5.5.28, by
the way.)

I browsed the Tomcat log files and the error is:

java.lang.ClassCastException: java.lang.Object cannot be cast to
java.lang.String...

Now, before I post any code, we pinpointed the problem to a
proprietary Java method being called inside the index.jsp page.  The
method is part of a closed-source class provided by a third-party
vendor.  That is, it is a black-box to us; we don't have the source
code, and it is provided to us by a third-party vendor (who is of no
help, because the class was not explicitly designed for mobile
platforms).

Here's the weird thing: The index.jsp page works on desktop browsers
and mobile browsers (i.e. Android, Safari), in both emulators and the
device.  The error above ONLY occurs when launched from the app.  We
confirmed it fails with Android version 2.3.6, 2.3.7, and 4.x on
emulators and devices; however, it does work on Android SDK Emulator
2.3.3.

I'm not asking to diagnose why the class is failing because, frankly,
I think that might be a dead-end, unless someone here is familiar with
BMC Remedy.  I'd rather not waste anybody's time.

But what I am asking is why on Earth would a paged served by Apache
Tomcat get an error in an android app webview, yet it works in the
browser?  It's not just that the error occurs in the app that doesn't
make sense.  What's bizarre is there's an error in the first place.
webview is just an extenion of the webkit engine and behaves as a
browser -- it's a client.  So, the app is the client.  And the jsp
code is parsed by Tomcat and the request is sent to the app's webview,
which would parse the html, right??? Or, am I completely wrong on the
model?

Maybe someone can explain how webview works under the covers?  Does
webview act as a true client?  Why would it cause Tomcat to throw an
error.  webview shouldn't have any business processing jsp code --
isn't that Tomcat's responsibility?  I would love to hear an
explanation on the full process of how webview works, because it seems
like it's not a true client-model relationship inside the app.

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] Is there way of using NFC without Secure Element?

2012-03-20 Thread Jeff Wang
I am a NFC starter, and just want to know what is the role of Secure
Element in NFC development for Android, and is there any other way of
using NFC but without Secure Element? 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] Connect MediaRecorder to MediaPlayer

2012-03-14 Thread Jeff
 

I want to test running both the hardware video encoder and decoder 
simultaneously. To that end I'm trying to figure out how to connect the 
output of a MediaRecorder as the input to a MediaPlayer. The only way I 
could figure out to do this was through DatagramSockets connected through 
the loopback and ParcelFileDescriptors. I'm having some trouble getting 
this to work though. Is there a better way to hook up a MediaRecorder to a 
MediaPlayer? Know of any sample code that exists?

Thanks in advance.

-- 
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: able to select 2 RadioButton in a RadioGroup ??!??!

2012-02-23 Thread Jeff
I know Im too late to reply to this, but for anyone who comes through here 
looking for a solution...

You must register an id for each RadioButton in the RadioGroup. The 
RadioGroup will clear RadioButton selection based on their resource id.


RadioGroup group = new RadioGroup(this.
getApplicationContext()); 
this.setContentView(group); 

for (int i = 0; i  10; i++) { 
group.addView(getRadioButton(i)); 
} 


private RadioButton getRadioButton(final int position) { 
RadioButton v = new RadioButton(this.getApplicationContext()); 
*int i = 0;*
if (position == 0) { 
v.setChecked(true); 
*v.setId(i++);*
} 

return v; 
}




On Wednesday, September 15, 2010 9:10:44 AM UTC-4, Christophe wrote:

 hello, 

 I have a simple RadioGroup in one of my view, with several 
 RadioButton : 

 RadioGroup group = new RadioGroup(this.getApplicationContext()); 
 this.setContentView(group); 

 for (int i = 0; i  10; i++) { 
 group.addView(getRadioButton(i)); 
 } 


 private RadioButton getRadioButton(final int position) { 
 RadioButton v = new RadioButton(this.getApplicationContext()); 
 if (position == 0) { 
 v.setChecked(true); 
 } 

 return v; 
 } 


 It display 10 radio buttons, and one of them is checked (the first 
 one). But if I click on another radio button, the first one stay 
 selected ... 

 Is there something wrong with my 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

[android-developers] Re: How to implement multiple Android versions to use different libraries?

2012-01-11 Thread Jeff A Knaggs
Similar to Kostya's suggestion, but requires less knowledge of eclipse/
ant/java; however, it doesn't meet your criteria of I prefer to keep
my app in one single project.

This is what I came-up with before libraries were available; it's not
fully automated. But, if you're old-school like me and host in a unix
(Mac OSX, Linux, Cygwin+Windows) like environment, you can setup
multiple projects in eclipse for each target, making one project your
working/master environment, and the others are just  build projects
(except for things specific to the target). Files that have no
differences and don't have any target differences are symbolicly
linked in each target project directory tree.  Files that are only
different because of target dependencies (most often due to java
IMPORTs like R.* for your resources/assets), are the part that require
a manual step before you perform a build. I create stream-editor (unix
sed commmand) scripts via shell language that I run before a build, it
reads the input file from the working/master project and re-writes it
in the target directory, I create marker comments in the source file
that are keys telling sed what to substitute/delete/etc. I'm sure
there is probably a way in eclipse to actually tell eclipse to invoke
the script as part of a build, but I've never bothered to go look.
This is way more complicated than libraries, but if your  background
is command-line oriented, it's pretty common-sense and easy. I tried
libraries the day they were first available and had too many small
issues and re-turned to this method. I suspect most of those issues
have been cleared-up, but my methods gives me some flexibility with my
source (that I find lacking (!!) in java) because it allows me to
modify the source as though the language had a decent pre-processor
built into it's definition. Some of the things my scripts modify can
probably (??) be worked around with java reflection and such, but my
working knowledge of java is not as good as it should be. And I prefer
compile/build/static solutions over run-time when ever available.

I'm purposely not providing examples because this method should not be
used unless you can comfortably implement it from the description
provided !!

I keep the shell script(s) in the target project tree, but they could
just as well be in the master/working project.


On Jan 10, 5:18 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 What I just did in a similar situation, is use additional source folders,
 thus avoiding excessive use of libraries.

 I have two versions of the same app: one for Market and one for another
 store.

 My source directory structure has:

 src
     package org.kman.FooBar.licensing
         SomeClass.java

 src-market
     package org.kman.FooBar.licensing
         SomeClassFactory.java
         SomeClass_Market.java

 src-another-store
     package org.kman.FooBar.licensing
         SomeClassFactory.java
         SomeClass_AnotherStore.java

 There are two versions of the same class, SomeClassFactory, in either
 additional sKostyaource folder, under the same name, in the same package, and 
 so
 I can just do SomeClassFactory.create() in the main body of application
 code, without worrying about which one it is. The implementation of those
 factories is different, each instantiating its own subclass of SomeClass -
  the one for Market or for AnotherStore.

 Now, the bulid setup:

 1) In Eclipse: src-market and src-another-store are added as additional
 source foldeKostyars in the application project. Then src-another-store has an
 exclude filter matching everything: **/*.*.

 This way, both folders are accesible for browsing / editing / source
 control, but only the sources inside src-market are compiled.

 2) For command line builds: I have a modified build.xml, and use
 sourcepathref with javac when compiling, to supply one or the other
 additional source folder, depending on which version I'm building.

 This additional path reference is set by a task that executes early in the
 ant build setup sequence, and makes the decision based on a property passed
 into the build script with -Dbuildtype=market or
 -Dbuildtype=anotherstore on the ant command line.

 Finally, there are two very simple shell scripts that call ant with the
 appropriate -D... flags.The shell script(s)


 End result:

 - The sources for both versions are accessible in Eclipse
 - The app can be built in Eclipse, defaulting to one of the two possiblebut 
 when faced with spending my time learning features of java that aren't really 
 necessary
 configurations
 - The main body of application code is not in a library, but rather a
 regular application project so my change-compile-debug cycles are faster (I
 think)
 - Clean command line builds are just a simple shell command away, for
 either configuration
 - The Market version doesn't contain any code for the alternate store, and
 vice versa.
 - Command line builds name the build output with a suffix, something like
 

[android-developers] Re: Mac phone

2011-10-18 Thread Jeff S
I have an HTC EVO and a Macbook running Mac OS X 10.6.8.  I have been trying 
for a while now to get adb or Eclipse or anything else to recognize my phone 
on this computer.  
I can completely rule out any hardware issues because I can run the same 
computer with the same phone and the same cable and the same USB port and I 
boot to UBUNTU Linux instead of Mac OS and the phone shows up exactly as 
expected.
Also, I can tell the phone to mount as an external drive and it works under 
Mac OS or anything else.
I once downloaded and tried an IDE from Google that had the exact same 
problem.  Several people complained about it and everybody was supposedly 
working on a solution.  I haven't heard of any solution.  Has anyone else?

-- 
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 does WebView handle content:// urls internally?

2011-09-19 Thread Jeff Thorn
Internally, how does WebView handle content:// urls?  Does it use something 
like ContentResolver.openInputStream()?  I tried looking at WebView source 
code and it appears that loadUrl eventually just calls the native webkit 
loadUrl method. So how does it resolve data from a content provider?

Jeff

-- 
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] Changing the calendar for an existing event (Issue #10486)

2011-06-27 Thread Jeff Vincent
Is there a way to escalate this somehow?  Others besides myself are seeing 
this issue and it is highly annoying.  I just got an update a week or two to 
Android 2.3 (Gingerbread) on my EVO 4G and there is STILL no way to 
recategorize an existing appointment to a different calendar.
 
I see no activity from any developers regarding this issue and will gladly 
offer any help I can provide.  I'd try to fix it myself but haven't had the 
bandwidth to get bootstrapped to even know where the problem is.
 
http://code.google.com/p/android/issues/detail?id=10486
 
Thanks!!
 
Jeff

-- 
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: Activity Lifecycle Documentation Question

2011-05-02 Thread Jeff A Knaggs
Yes! Having mostly lurked over this list for the last year and half, I
see this thread come-up too frequently, and this area caused me a lot
of confusion. I don't want to change the thread, but want to emphasize
that to make intelligent suggestions, one has to understand the
process.  These questions actually seem to arise more from people with
a lot of experience to other programming environments and lacking in
Java depth rather than plain beginners and I think it is because
developers are fearful of making assumptions to fill in
documentation holes/conflicts because they KNOW that is where things
can  will break.  The whole scenario was even muddier for me because
I had constant questions in my mind as to the relationship of things
like Java static initializers to these life-cycle Objects (I knew
neither the framework (or similar frameworks and was new to Java
(still feel like a newbie)) - for instance when the process is killed
but the system decides to keep the Activitiy around, does the
framework re-do static initialization of the Objects if it re-uses the
killed activity?  Since the document doesn't say, the developer has to
black-box, then if the framework is every changed, unless you
programmed defensively (assume statics are not repeated) your
application may break. Clearer documentation would help a little (for
those that read it :-), saving Dianne,  Mark, and all the rest of you
very generous contributors (thank you!) time for other replies. I can
rock with documentation issues in most areas (I can always go peek at
the source), but activity life-cycle is the back-bone of every
application design; it deserves to be held to a higher standard, and
end-consumer developers need a high degree of confidence that the
process is accurately documented without having to look at the source
-- to me,  the documentation should be a contract between the
framework developers and the framework users (programmatically)...

thanks for all the replies and the people that are persistent in their
pursuit of definitive answers.

On Apr 28, 1:50 pm, Indicator Veritatis mej1...@yahoo.com wrote:
 Eric is not the first to observe that the documentation on these
 topics is too confusing. But where should he make this 'contribution'
 you suggest? Is the documentation somewhere under the Android Open
 Source project athttp://source.android.com/?

 On Apr 27, 10:23 pm, Dianne Hackborn hack...@android.com wrote:







  Yes if you call finish() you are saying you want to completely remove the
  activity from the stack.  The system can have the activity destroyed in the
  same way, but just not remove it from the stack it maintains.

  At the end of the day, it would be fundamentally broken if there was a way
  for an activity to stop being used in a process without being destroyed.
   This means it would be IMPOSSIBLE to write a correctly working application.
   I agree you can find parts of the documentation to help you convince
  yourself that there are cases this can happen, if that is what you are
  looking for.  But it won't.  Because it would be broken.  As I think is
  already obvious to you, since your original question was basically: if I
  read the documentation this way then there is nothing useful at all about
  onDestroy() or onStop() because they won't get called when they need to be.
   Right.  So don't try to read the documentation in a way that makes it
  broken.

  You are welcome to contribute changed to the documentation for people to
  review if there are things you think can be improved.

  On Thu, Apr 28, 2011 at 12:29 AM, Eric e...@alum.mit.edu wrote:

   On Apr 28, 12:21 am, Dianne Hackborn hack...@android.com wrote:
Asking it to finish means finishing the activity, which means
   destroying
it.  Politely asking it to finish isn't going to cause it to just not
cleanly exit.  It would be fundamentally broken if activities every just
stop being used in their process without actually going through the
lifecycle.

In other words asking to finish - Activity.finish() - does what you
expect.

   Ok, so when I 'finish' an Activity programmatically, never wanting it
   to show up in the Task stack again, how does the system know to remove
   my Activity from the back stack in that case, but it doesn't remove it
   from the stack when the system asks it to finish due to low memory
   conditions?

   Also, the documentation for onDestroy() adds to the confusion a bit:

   Called before the activity is destroyed. This is the final call that
   the activity will receive. It could be called either because the
   activity is finishing (someone called finish() on it), or because the
   system is temporarily destroying this instance of the activity to save
   space. You can distinguish between these two scenarios with the
   isFinishing() method.

   Note that it says if the Activity is being temporarily discarded to
   save space, then the 'isFinishing' method will return false.  If
   

[android-developers] Problems with View.startAnimation()

2011-03-09 Thread Jeff Meyerhoff
I am trying to start an animation after a delay from a Timer.
However, calling startAnimation() does not, well, start the
animation.  The animation that I set up with View.startAnimation()
only happens once I either touch the screen or scroll the scroll ball.

I have tried using a Handler, using runOnUiThread(), and neither to
see if it was an issue with not being on the UI thread.  Any help you
can give would be greatly appreciated.  This thing is killing 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] Re: Problems with View.startAnimation()

2011-03-09 Thread Jeff Meyerhoff


So it's more or less like this:
// Runnable with animation
private Runnable fadeInInfo = new Runnable() {


};
// View's click listener
View.OnClickListener songInfoClickListener = new
View.OnClickListener() {
public void onClick(View v) {
handle.postDelayed(fadeInInfo, 2000);
}
};




On Mar 9, 5:55 pm, Dianne Hackborn hack...@android.com wrote:
 Oh definitely just don't use Timer.  It is only trouble when interacting
 with the Android frameworks. :}









 On Wed, Mar 9, 2011 at 3:49 PM, Mark Murphy mmur...@commonsware.com wrote:
  Also, instead of a Timer, try using postDelayed() on the Handler (or
  any View) for your delay, and see if that helps.

  On Wed, Mar 9, 2011 at 6:45 PM, Dianne Hackborn hack...@android.com
  wrote:
   A working API demo is here:

 http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
   That seems to be what you are describing that you do, but there must be
   something different.  Try reducing your code to that and seeing where it
   starts working.

   On Wed, Mar 9, 2011 at 3:09 PM, Jeff Meyerhoff j...@jdmlabs.org wrote:

   I am trying to start an animation after a delay from a Timer.
   However, calling startAnimation() does not, well, start the
   animation.  The animation that I set up with View.startAnimation()
   only happens once I either touch the screen or scroll the scroll ball.

   I have tried using a Handler, using runOnUiThread(), and neither to
   see if it was an issue with not being on the UI thread.  Any help you
   can give would be greatly appreciated.  This thing is killing 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

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see
  and
   answer them.

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

  Android Training Worldwide:http://commonsware.com/training

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
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: Problems with View.startAnimation()

2011-03-09 Thread Jeff Meyerhoff
The problem persists.  By having the startAnimation in the view's
onClick, it fires just fine.  The problem starts as soon as I move it
into a Runnable or TimerTask called by either a Handler or Timer
respectively.

Basically what I'm doing is this:

private Runnable fadeInInfo = new Runnable() {
public void run() {

findViewById(R.id.TextViewInformation).startAnimation(animationFadeIn);
}
};

View.OnClickListener clickListener = new View.OnClickListener() {
public void onClick(View v) {
handle.postDelayed(fadeInInfo, 2000);
}
};

On Mar 9, 5:55 pm, Dianne Hackborn hack...@android.com wrote:
 Oh definitely just don't use Timer.  It is only trouble when interacting
 with the Android frameworks. :}









 On Wed, Mar 9, 2011 at 3:49 PM, Mark Murphy mmur...@commonsware.com wrote:
  Also, instead of a Timer, try using postDelayed() on the Handler (or
  any View) for your delay, and see if that helps.

  On Wed, Mar 9, 2011 at 6:45 PM, Dianne Hackborn hack...@android.com
  wrote:
   A working API demo is here:

 http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
   That seems to be what you are describing that you do, but there must be
   something different.  Try reducing your code to that and seeing where it
   starts working.

   On Wed, Mar 9, 2011 at 3:09 PM, Jeff Meyerhoff j...@jdmlabs.org wrote:

   I am trying to start an animation after a delay from a Timer.
   However, calling startAnimation() does not, well, start the
   animation.  The animation that I set up with View.startAnimation()
   only happens once I either touch the screen or scroll the scroll ball.

   I have tried using a Handler, using runOnUiThread(), and neither to
   see if it was an issue with not being on the UI thread.  Any help you
   can give would be greatly appreciated.  This thing is killing 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

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see
  and
   answer them.

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

  Android Training Worldwide:http://commonsware.com/training

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
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: Problems with View.startAnimation()

2011-03-09 Thread Jeff Meyerhoff
@Mark Murphy
That's a good idea but my goal is to have the view only appear after
screen inactivity.  So I want/need the ability to cancel the scheduled
animation.

@Romain Guy
It has been my understanding and experience that a Handler object
could be used to schedule things on the UI thread.  Yet if I use a
Handler, the behavior is the same as using the Timer (although that
could be due to different causes).  As I wrote before, I have tried a
Handler and runOnUiThread() to little success.

Although the problem hasn't been solved, thank you all for replying
and replying so quickly.

On Mar 9, 7:28 pm, Mark Murphy mmur...@commonsware.com wrote:
 That's odd.

 Another thing you can try is getting rid of the timer/runnable stuff
 and use android:startOffset to provide your delay.









 On Wed, Mar 9, 2011 at 8:22 PM, Jeff Meyerhoff j...@jdmlabs.org wrote:
  The problem persists.  By having the startAnimation in the view's
  onClick, it fires just fine.  The problem starts as soon as I move it
  into a Runnable or TimerTask called by either a Handler or Timer
  respectively.

  Basically what I'm doing is this:

         private Runnable fadeInInfo = new Runnable() {
                 public void run() {

  findViewById(R.id.TextViewInformation).startAnimation(animationFadeIn);
                 }
         };

         View.OnClickListener clickListener = new View.OnClickListener() {
                 public void onClick(View v) {
                         handle.postDelayed(fadeInInfo, 2000);
                 }
         };

  On Mar 9, 5:55 pm, Dianne Hackborn hack...@android.com wrote:
  Oh definitely just don't use Timer.  It is only trouble when interacting
  with the Android frameworks. :}

  On Wed, Mar 9, 2011 at 3:49 PM, Mark Murphy mmur...@commonsware.com 
  wrote:
   Also, instead of a Timer, try using postDelayed() on the Handler (or
   any View) for your delay, and see if that helps.

   On Wed, Mar 9, 2011 at 6:45 PM, Dianne Hackborn hack...@android.com
   wrote:
A working API demo is here:

  http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
That seems to be what you are describing that you do, but there must be
something different.  Try reducing your code to that and seeing where 
it
starts working.

On Wed, Mar 9, 2011 at 3:09 PM, Jeff Meyerhoff j...@jdmlabs.org 
wrote:

I am trying to start an animation after a delay from a Timer.
However, calling startAnimation() does not, well, start the
animation.  The animation that I set up with View.startAnimation()
only happens once I either touch the screen or scroll the scroll ball.

I have tried using a Handler, using runOnUiThread(), and neither to
see if it was an issue with not being on the UI thread.  Any help you
can give would be greatly appreciated.  This thing is killing 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

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time 
to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see
   and
answer them.

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

   Android Training Worldwide:http://commonsware.com/training

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

  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com

  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see and
  answer them.

  --
  You received this message because you are subscribed

[android-developers] Re: Problems with View.startAnimation()

2011-03-09 Thread Jeff Meyerhoff
That's only available on API level 8+ (2.2).  I would like at least a
1.6+ solution and most of this stuff is API level 1.

On Mar 9, 7:45 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Mar 9, 2011 at 8:42 PM, Jeff Meyerhoff j...@jdmlabs.org wrote:
  @Mark Murphy
  That's a good idea but my goal is to have the view only appear after
  screen inactivity.  So I want/need the ability to cancel the scheduled
  animation.

 Call cancel() on the animation, then.

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

 Android Training Worldwide:http://commonsware.com/training

-- 
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: NFC default app - thoughts?

2011-03-07 Thread Jeff Hamilton
With Android 2.3.3 the tag dispatching has been improved quite a bit.
See the docs at http://developer.android.com/reference/android/nfc/Tag.html
for details on how it works now.

We generally would like to see people deploying tags using NDEF data
on them since it's much easier to deal with for developers. For
example, we inspect the first NDEF record in the first NDEF message
and build an Intent based on the content. If it's a URL we fill in the
data field on the NDEF_DISCOVERED intent, and if it's MIME data we
fill in the type field on that Intent. This lets developers filter for
tags that contain only data they're interested in.

Also, NDEF can be stored on many types of tags so you don't have to
worry about custom tag protocols when writing apps.

-Jeff

On Feb 8, 12:51 am, andrew and...@mackenzie-serres.net wrote:
 TopTunniste for tags for example

 On Feb 7, 10:09 pm, Mark Murphy mmur...@commonsware.com wrote:

  Have you examined an Intent sent out when anNFCtag is encountered?
  Perhaps the path is part of the Intent and can be filtered upon with
  the data element in your intent-filter.

  Touchatag is sold out of their kits -- anyone know where else to get
  someNFCtags?

  On Mon, Feb 7, 2011 at 4:03 PM, Mark Wyszomierski mar...@gmail.com wrote:
   Hi,

   If I declare my application to be able to readNFCtags using the
   following:

    activity
        android:name=.activities.ActivityFoo 
        intent-filter
          action android:name=android.nfc.action.TAG_DISCOVERED/
        /intent-filter
    /activity

   and the user chooses my app as the default for further reads, we're
   essentially wiping out the chance for any other app in the system to
   handle tag reading?

   Just wondering how we'll balance this. My tags actually point to
   specific urls, like:

    foo.com/a
    foo.com/b

   So what would be more ideal is to let the OS give the user a chance to
   set a default for a tag read action + a specific url domain pattern
   for example. That seems more fine-grained and appropriate here?

   Just wondering what others think on this,

   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

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

  _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
  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


[android-developers] Re: Android Market having trouble authorizing anyone today?

2011-02-23 Thread Jeff
Happening to me, too. Nearly all of my orders this morning are stuck
in 'Customer review in progress...'  Maybe some big changes are coming
like more paid countries and payment options.  One can hope :(  It is
the day before the Xoom launch and the rumored Music and Book launch.
Coincidence?  Probably.

Jeff
___
Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno
www.trackaroo.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] Change Resolution Policy when screen orientation changes

2011-01-26 Thread Jeff
I have a Live Wallpaper using AndEngine which has several small images
floating around the screen. I can set the initial screen orientation
and RatioResolutionPolicy without any problems, but if I rotate the
screen (or slide the the keyboard on some devices) and trigger a
ScreenOrientation change, the ratio is off because it's trying to
stretch each image since the ratio has changed. I.E. the width is
originally 480 and height is originally 720, so 720/480 = 1.5, but
when the screenorientation changes/rotates, the images try to fit into
480/720 ratio (0.67).

I have confirmed onResume is called when the screen is rotated, but
there doesn't appear to be a way to re-set the Engine using the new
height/width.

-- 
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: App disappeared from Market Home

2010-12-20 Thread Jeff
My app came back.  I tried to update and fix the category bug.  And
then it disappeared again.  So the lesson here is don't update your
app or save any changes to the console for awhile.

Jeff
---
www.trackaroo.com
Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno

On Dec 20, 4:16 am, Ilya Shinkarenko shin...@gmail.com wrote:
 Well, right after another update the app has disappeared again.

 Moreover, it also disappeared from AppBrain 
 pagehttp://www.appbrain.com/app/com.tennismath.ui.android

 Isn't is great? :) BTW since still got no reply from Google support.
 This is really frustrating...

 On 19 December 2010 20:32, Jeff j...@trackaroo.com wrote:







  How were you able to get your app to re-appear in the console?  I
  suffered the same issue when I submitted my update.  My app is
  incorrectly in the Games category and don't have a way to fix this
  category bug.

  Jeff
  ---
 www.trackaroo.com
  Trackmaster - Motorsports Lap Timer
  Dynomaster - Performance Dyno

  On Dec 19, 5:19 am, Ilya Shinkarenko shin...@gmail.com wrote:
  Thank you all for the answers. Now the app is again there. U :)

  On Dec 18, 10:25 pm, TreKing treking...@gmail.com wrote:

   On Sat, Dec 18, 2010 at 2:58 PM, Chister Nordvik cnord...@gmail.com 
   wrote:
I really can't understand why they cannot just make the console 
unavailable
instead of developers experiencing buggy behavior like this.

   Then who's going to test their stuff for them!? =P

   ---
--
   TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
   transit tracking app for Android-powered devices

  --
  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: App disappeared from Market Home

2010-12-20 Thread Jeff
I've always used Chrome.  At least for this 'update app or save'
issue, I don't think it's due to the browser.

I did get a second follow-up, canned reply from Google:

'Hello,

Thank you for taking the time to write to us. Our team is currently
investigating your report. We hope to have a resolution soon, and will
contact you when we have an update or if we need further information.

Thank you for your patience. If we can assist you further, please let
us know.

Jeff
---
www.trackaroo.com
Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno



On Dec 20, 3:14 pm, TreKing treking...@gmail.com wrote:
 Which browser are you guys using? I had an issue updating yesterday where it
 wouldn't accept my hi-rez icon on Firefox and gave me some strange JSON
 parsing error when I uploaded my app.

 Everything went fine when I used Chrome instead.

 I think it's a cheap way to get people to use Chrome :-P

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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: App disappeared from Market Home

2010-12-19 Thread Jeff
How were you able to get your app to re-appear in the console?  I
suffered the same issue when I submitted my update.  My app is
incorrectly in the Games category and don't have a way to fix this
category bug.

Jeff
---
www.trackaroo.com
Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno

On Dec 19, 5:19 am, Ilya Shinkarenko shin...@gmail.com wrote:
 Thank you all for the answers. Now the app is again there. U :)

 On Dec 18, 10:25 pm, TreKing treking...@gmail.com wrote:







  On Sat, Dec 18, 2010 at 2:58 PM, Chister Nordvik cnord...@gmail.com wrote:
   I really can't understand why they cannot just make the console 
   unavailable
   instead of developers experiencing buggy behavior like this.

  Then who's going to test their stuff for them!? =P

  --- 
  --
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

-- 
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: What's the best way to have your app 'sleep' for N milliseconds?

2010-12-06 Thread Jeff M.
Inside your MyActivity.onCreate method:

Handler timeoutHandler = new Handler()
{
  //@Override
  public void handleMessage( Message msg )
  {
// after receiving the timeout message, start the next activity
Intent intent = new Intent( MyActivity.this,
MyOtherActivity.class );
startActivity( intent );
// terminate this activity if you don't want to leave it on the
activity stack:
MyActivity.this.finish();
super.handleMessage( msg );
  }
};
Message msg = new Message();
timeoutHandler.sendMessageDelayed( msg, 6 ); // milliseconds

On Nov 29, 9:49 am, charlest stevegut...@gmail.com wrote:
 I want to display a message on the screen, have it displayed for 60
 seconds, then display another message. There is nothing specific going
 on during the 60 seconds that I'm waiting to complete, so AsyncTask
 doesn't seem to apply. Does someone have a generic code snippet that
 does this so that I can use it in other places as needed?

-- 
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 create a tablet App with direct FULLSCREEN?

2010-12-06 Thread Jeff M.
To make an application expand to fill any screen size:
1. Open AndroidManifest.xml.
2. Select the Manifest tab.
3. Select Add… then Supports Screens.
4. Set Normal screens to true, set Large screens to true, set Any
denisty to true. Leave the others blank.

This is the XML:
supports-screens
android:largeScreens=true
android:anyDensity=true
android:normalScreens=true
/supports-screens

Cheers,
Jeff

On Dec 2, 12:03 pm, Foolx foo...@gmail.com wrote:
 Hi there!

 I just got my Android Tablet (Archos 10.1 IT) and want to programm
 some little Tools for it.
 I already started with eclipse and the first Tutorials, but i already
 found some problems i can't handle.
 Please help me!

 I defined a Virtual Device fitting my real Device with 10.1 1280 x
 720px
 but when i start the app its just a little screen in the middle of
 this Device.
 How can i change the view to being fullscreen and widescreen also, -
 Full fill parent.
 My Main View looks like this:

 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
 android
     android:layout_width=fill_parent
     android:layout_height=fill_parent
     TextView
         android:id=@+id/label
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:text=Type here:/
     EditText
         android:id=@+id/entry
         android:layout_width=fill_parent
         android:layout_height=wrap_content
         android:background=@android:drawable/editbox_background
         android:layout_below=@id/label/
     Button
         android:id=@+id/ok
         android:layout_width=wrap_content
         android:layout_height=wrap_content
         android:layout_below=@id/entry
         android:layout_alignParentRight=true
         android:layout_marginLeft=10dip
         android:text=OK /
     Button
         android:layout_width=wrap_content
         android:layout_height=wrap_content
         android:layout_toLeftOf=@id/ok
         android:layout_alignTop=@id/ok
         android:text=Cancel /
 /RelativeLayout

 Where is my problem, how can i change it to real 1280x720 widescreen?

 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: adb can't find my Verizon Samsung Galaxy Tab ...

2010-11-29 Thread Jeff M.
Anyone know how to get the Tab recognized on a Mac? I have USB
debugging turned on, installed the latest Android SDK, installed the
Galaxy Tab add-on in Eclipse, rebooted the Mac and the Tab, but adb
still doesn't see it. I probably need a driver, right? I don't see one
anywhere for the Mac.

-- 
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 handle major revisions to OpenGL game in Android Market

2010-11-14 Thread Jeff Boody
What version of Android guarantees a hardware accelerated OpenGL ES 2.0 
context?

If your app specifies that it uses OpenGL ES 2.0 in the Android
manifest then it will only show up on the Market for devices which
support it.

For example:

uses-feature android:glEsVersion=0x0002/

I would like to limit limit these devices to the 1.x branch version of the app.

The early Android devices don't support OpenGL ES 2.0 so your new app
wouldn't show up in the Market for old devices.

How can I have 2 apps in the Android Market that have the same
name?  I'd rather not have to append some word like 'Pro', 'Extreme',
etc. on a new application since my current users that have sufficient
hardware to run the 2.x branch would not be automatically updated.

I think it would be difficult for users to differentiate between the
two apps with the same name so I would recommend having a different
name.

Is the solution to add code to the 1.x branch that checks the hardware on
startup and posts some message that they should download the new 2.x
branch app instead?

I think this is a good idea.

You can figure out if a device supports OpenGL ES 2.0 when it is
started by looking at the EGL configs to see if any support the
EGL_OPENGL_ES2_BIT.

-- 
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: OpenGL glScissor not working on HTC phones

2010-11-14 Thread Jeff Boody
I do not do a gl.glClear(GL10.GL_COLOR_BUFFER_BIT); so the bits that were 
drawn previously should remain.

Actually this isn't the default behavior.

I think you need to request EGL_BUFFER_PRESERVED for the
EGL_SWAP_BEHAVIOR.

Unfortunately this currently (froyo) isn't possible because Android
only supports EGL 1.0 + some extensions.

The eglSurfaceAttrib() API entry point was added at a later version of
EGL.

-- 
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] Just wondering that can I use C2DM service without uploading App to Android Market?

2010-10-21 Thread Jeff
In case of using C2DM service, it is necessary to uploading App to
Android Market?
Is it impossible that I upload App using C2DM service to another
market? (not Android Market)

-- 
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] Google Market cancelling orders

2010-10-05 Thread Jeff A Knaggs
All of a sudden, since the Market underwent it's recent multiple
country expansion, I'm seeing, on  a fairly regular basis,
cancellations with a subject:

Order XYZZY has been cancelled by Google

With an explanation that boils down to:

...because we were unable to verify that buyer's account
information...

So far it's all been with customers' billing addresses in S. Korea?

Wondering if any other developers with paid apps are seeing an
increase in these types of cancellations and if they are clustered to
any particular country?

-- 
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 create custom controls that mimic real device's UI?

2010-08-16 Thread Jeff Gross
I want to create a button that looks exactly like a CheckBox (same
size, same button face color, etc.), but instead of a checkmark, has a
square with a configurable color on it. My solution was to subclass a
View, set the background resource to a shape drawable which mimics the
CheckBox background and then override onDraw() to put the colored
rectangle on top. All this worked great in the emulator, but when I
tested it on a device, I quickly learned that devices have their own
stylized controls and my control looked out of place.

I looked at the built-in Android resources and found that
android.R.drawable.button_default_small might work nicely as the
background resource. However, the button face is not centered within
the 9-patch image, probably because of the drop-shadow so it makes it
hard to position my colored rectangle. Also, I'm not sure how to find
the dimensions of a CheckBox to size my control --
android.R.dimen.default_checkbox_size seems like a good place, but it
doesn't exist :-).

What do others do to make custom controls that integrate well with any
device's UI?

Thanks,
Jeff

-- 
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: Record audio problem on the LG Ally

2010-08-12 Thread Jeff Knaggs
I'm curious, you do a copy with C++; did you do this because you
assumed/thought you needed the extra speed boost?  I.e., not because
you're then going to use a bunch of other (already written ;-) C++ to
process the data).  If the answer is YES -- for speed, did you do
any benchmarking to see if this was truly an issue? And, if YES, would
you be willing to share the benchmarking data?

On another note, would you mind if I emailed you directly on some
question related to audio but unrelated to this thread?  If you decide
that topic is worthy of being posted/shared in this group, we can move
it over.

thanks
jeff knaggs

-- 
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 sdk emulator question: how can I replace framework-res.apk?

2010-07-19 Thread Jeff
I made some changes to the framework-res.apk.  However, I don't know
if it is possible to push it to the emulator without having to rebuild
the entire system image.  Can someone help me here?

Thanks!
Jeff

-- 
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: Rapid Android Development with AML, looking for feedback

2010-07-14 Thread Jeff Rowberg
 1.) How is AML different from using  HTML with  Webview?

I have an ongoing and interesting discussion with John Coryat about
that very thing, after he suggested using WebView to avoid reinventing
the wheel. There are situations where you could effectively use either
WebView or AML to accomplish your goal, and it will depend on your
preference and/or familiarity with Java vs. HTML/CSS/Javascript.

My understanding of WebView before talking to John was almost zero,
but I have since learned more. It surprised me to find out that the
Gmail app uses WebViews, and I'd love to find out how exactly (I'm
guessing for message rendering, but maybe other areas as well). Here
are the differences I came up with originally--please keep in mind
that I now know these are not all totally valid points:

1a. WebView displays HTML/CSS/Javascript, but does not provide web-
based access for directly creating or responding to native UI
components.
1b. AML dynamically interprets the markup to create native UI
components and capture events.

2a. WebView presents a browser-like interface, so that tapping on a
link (for example) is really directing the WebView to a new URL, and
not firing a click event within the same Activity.
2b. AML (as mentioned in 1b) attaches and handles native events.

3a. Apart from some outside control by the app, WebView actions all
take place within the same Activity (where the WebView object is
placed).
3b. AML blocks may define multiple unique Activities which can have
objects and events that may direct the user to completely new (and
potentially dynamic) Activities or Intents.

John has explained that WebView does indeed provide a way (the
addJavascriptInterface() method) to use Javascript inside the WebView
content to interact with Java in the native App code, even firing
events and moving to new Activities. Therefore, all three points above
can be overcome at least in a limited way by using WebView. But it
doesn't seem efficient to use this kind of method to attempt to create
a 100% dynamically built native app, which is what I'm going for.

Some people will always prefer a native implementation for some
projects, either because of the visual differences, or because it's
almost definitely going to be faster, or both. While AML probably
wouldn't be faster than WebView if every single user action resulted
in a request/response/parse/interpret/build operation, I think the
actual flow will be very different.

My goal is to have a web application send the complete collection of
the whole app interface all in one shot, except for 100% dynamic
aspects like search results or detailed views of every discrete data
entity. This way, aside from the initial load, the app will be much
faster and cleaner than a simple web-based version could ever be.
Since a decently complex Activity could be created in perhaps only 2K
of AML data, it is reasonable to assume that a dozen or more
individual Activities could be built and sent to the device all at the
same time. With a clever bit of short-term caching and background
loading, it might even be possible to completely hide the fact that
each layout was built on-the-fly by a remote host.

I don't want to build a one-page-at-a-time query/response library,
since that would have minimal to no benefit above other options. I
anticipate that AML will be used mainly with web app APIs that take
advantage of multiple views and caching, and not by just directing the
app to parse whatever data is at http://aml.mywebapp.com/index.php;
and then browsing page-by-page using a limited but native interface.

Hopefully that all made sense, and is logically sound. :-)

 2.) I would use it right away if it were available for RIM's OS. That
 platform can immensely benefit from a well supported and efficiently
 implemented markup language for UI.

I haven't thought about supporting that OS, though I definitely don't
see why it couldn't be done. I'll keep it in mind and try to do some
research in that direction.

Thanks for your input!

Jeff

-- 
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: Rapid Android Development with AML, looking for feedback

2010-07-13 Thread Jeff Rowberg
Hello again everyone,

Due to the response I got from DZone, I've migrated my AML project to
its own website, which you can find here:

http://www.amlcode.com

My quest for feedback and input from the Android development community
is still going on though, so if anyone has any suggestions, ideas,
criticism, anything at all, I'm wide open to what you have to say.
Specifically, here's what I'm trying to find out:

1. Would you use this for your own app?
2. What would it need to do in order to be most useful?

Jeff

-- 
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] Rapid Android Development with AML, looking for feedback

2010-07-12 Thread Jeff Rowberg
Hey everyone,

I'm pretty new to Android development, but I'm experienced with Java, C
++, and PHP, so I've been able to pick up a working knowledge pretty
quickly.

I'm looking for feedback on something I've begun to create,
specifically for my needs but definitely with potential for the
general Android development community. It's a simple markup language
that can designate layout and behavior for apps in a way that is very
easy to write but directly uses the native UI. It's a set of template
layout files (in /res/layout) and classes (in /src) that you include
in your project to enable this functionality. The implementation code
you have to write to use it is very, very simple.

My goal is to be able to have an app that is structurally built using
native code, but where the content, layout, and behavior are
controlled by an external source (a web service in my case). That way,
the app behavior will change automatically as the web service is
updated to include new features. I have seen tools like Rhomobile and
Appcelerator, and while they are great for certain needs, they don't
do exactly what I'm looking for.

I've called the code library that I'm working on AML, for App Markup
Language. It's simple, structured XML that the code parses and
dynamically builds layouts and views from. It's definitely still in
its infancy; there are no specifications or documentation yet, and it
is still missing a lot of important features (specifically, dealing
with events and processing inputted data). But hey, for being only
four days old, I'm really pleased with how it's come out so far.

For a few more details and some example code and screenshots, go here:
http://www.sectorfej.net/2010/07/10/rapid-android-development-with-aml

A sample snippet of AML looks like this: (hopefully the formatting
won't break in the post)

aml
  input type=buttonTest Button/input
  input type=checkboxTest CheckBox/input
  input type=togglebutton checked=yes /
  input type=imagebutton image=drawable/icon /
  input type=textTest Text/input
  input type=passwordTest Password/input
  radiogroup
input type=radiobutton checked=yesRadio Button 1/input
input type=radiobuttonRadio Button 2/input
input type=radiobuttonRadio Button 3/input
  /radiogroup
/aml

It's WAY simpler than the /res/layout XML you'd have to build (the
linked page shows what it would look like there for comparison). It
feels a lot like HTML, but it isn't quite the same. It is very simple
and straightforward though, and supports features like font size and
color, background colors, tables (with colspan), alignment and
padding. I'm working on more critical features now, like specifying
multiple activities and being able to switch between them.

I'm sure that AML can't solve every problem, and a lot of native code
will still be required for certain kinds of applications. It isn't
going to be able to simply everything you can do with Android (games
come to mind). But for data-centric apps, or especially apps that are
primarily just mobile interfaces to web services, it could be a huge
help, especially as more features are added.

I have two questions for all of you here:

1. Would you use this for your own app?

2. What would it need to do in order to be most useful?

I usually only think of the features I need, but I know I'll be
missing out on a lot if that's all I do. So please, feel free to give
any feedback, comments, suggestions, or otherwise. If you know of
another project that is doing something similar to this, I'd be really
interested in it. I googled for a bit but didn't see anything like it.

Overall, I do have to say that coding for Android is a lot of fun.
Seriously. I was a little worried a first, but not anymore.

-- 
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] AIDL, Binder, ResultReceiver, and Performance

2010-06-26 Thread Jeff Sharkey
 If the purpose of this code (and I haven't looked at it to know) is to send
 a command to the service and get told later when it is done, then this is a
 reasonable approach.

Yep, that's exactly what I'm using it for.  I'm kicking off a heavy
background sync, and use an optional ResultReceiver to pass back
success/failure along with any Exception text for Toast'ing to the
user.


 Not my team's app...  I've not looked at the code, either. :}

The app was written by two engineers on the Android team, but not
anyone specifically working on the framework.


-- 
Jeff Sharkey
jshar...@android.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] Android emulator problems

2010-06-15 Thread Jeff Colapietro
So, I've been doing the android tutorials and every time I try to load
the emulator it gets to the waiting for HOME step and then cancels.
It will load the emulator, but it will only get to the screen with
ANDROID across.

I rebooted my computer redid the tutorials and cleaned the projects
and tried again.  This time it worked after a while, but when the
emulator actually loaded, my app wasnt on the device.

Can someone please help me out, I'm not sure if i messed up
configuring eclipse or what I'm doing wrong.  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] stop/prepare MediaPlayer issues

2010-06-15 Thread Jeff B.
Hello,

I have an ImageButton that plays a sound whenever it is held down and
stops as soon as you let up.  To do this I register an onTouch handler
and operate on ACTION_DOWN and ACTION_UP MotionEvents.  The code is
below.  The idea is that when the ACTION_UP comes in I first call
stop() and then I re-prepare the sound so that it is all ready for the
next start() in a subsequent ACTION_DOWN.  I do this instead of start/
pause because I need the sound to start from the beginning each time
and the seekTo() call is asynch which seemed to complicated the
logic.  The problem I'm having is that every now and then if I'm
really beating on the button (i.e. clicking it rapidly and for
different durations) I will hit the illegal state exception.  The
debugger log shows that I am in MEDIA_PLAYER_PLAYBACK_COMPLETE (128)
when trying to call prepare().  As you can see below, I only try to
call prepare after I have called stop.  So this would imply that stop
is somehow either asynchronous or the two operations are being allowed
to happen in an overlapped fashion.

So two questions:  1) does anyone have an explanation for what I'm
seeing?   2) is there a better/cleaner way to do what I'm trying to do
in general?  This is my first android app so it's very possible I'm
missing the boat on something.

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Context appCtx = getApplicationContext();

// button init code removed

mSoundBeep = MediaPlayer.create(appCtx, R.raw.beep);

mImgBtnBeep.setOnTouchListener(new OnTouchListener() {
   public boolean onTouch(View v, MotionEvent event) {

   switch (event.getAction()) {
  case MotionEvent.ACTION_DOWN:
 mSoundBeep.start();
 break;

  case MotionEvent.ACTION_UP:
 if (mSoundBeep.isPlaying()) {
mSoundBeep.stop();
 try {
   mSoundBeep.prepare();
} catch (IllegalStateException e) {
   mSoundBeep.release();
   Context appCtx = getApplicationContext();
   mSoundBeep = MediaPlayer.create(appCtx, R.raw.beep);
} catch (IOException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
}
 }
 break;
   }

   return false;
   }
});

-- 
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] Change Default Package Name of R.java

2010-06-15 Thread Jeff
Hi all,
I am writing an app that has a consistent code base, but has different
resources that make it a new app. My ant script copies
AndroidManifest.xml, res and assets dirs for a particular app prior to
kicking off the build. This approach works great if all the apps have
the same application package name. However, I want to be able to
install more than one app from this common code base, so I must change
the application package name.

If I change the package names in each AndroidManifest.xml, then R.java
gets generated with the new package name. This causes all my
references to the resources constants in my common code base to throw
an error.

It would be great if I could specify the package name I want aapt to
use when generating R.java. Does anyone know if this is possible? Any
other suggestions?

Thanks,
Jeff

-- 
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: stop/prepare MediaPlayer issues

2010-06-15 Thread Jeff B.
To avoid any confusion, I don't know if I made it clear that the code
I have listed is currently working.  I'm just not sure of why I am
needing the IllegalStateException logic.

Thanks,
Jeff

On Jun 12, 12:39 am, Jeff B. jeffbromber...@gmail.com wrote:
 Hello,

 I have an ImageButton that plays a sound whenever it is held down and
 stops as soon as you let up.  To do this I register an onTouch handler
 and operate on ACTION_DOWN and ACTION_UP MotionEvents.  The code is
 below.  The idea is that when the ACTION_UP comes in I first call
 stop() and then I re-prepare the sound so that it is all ready for the
 next start() in a subsequent ACTION_DOWN.  I do this instead of start/
 pause because I need the sound to start from the beginning each time
 and the seekTo() call is asynch which seemed to complicated the
 logic.  The problem I'm having is that every now and then if I'm
 really beating on the button (i.e. clicking it rapidly and for
 different durations) I will hit the illegal state exception.  The
 debugger log shows that I am in MEDIA_PLAYER_PLAYBACK_COMPLETE (128)
 when trying to call prepare().  As you can see below, I only try to
 call prepare after I have called stop.  So this would imply that stop
 is somehow either asynchronous or the two operations are being allowed
 to happen in an overlapped fashion.

 So two questions:  1) does anyone have an explanation for what I'm
 seeing?   2) is there a better/cleaner way to do what I'm trying to do
 in general?  This is my first android app so it's very possible I'm
 missing the boat on something.

 public void onCreate(Bundle savedInstanceState) {

 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);

 Context appCtx = getApplicationContext();

 // button init code removed

 mSoundBeep = MediaPlayer.create(appCtx, R.raw.beep);

 mImgBtnBeep.setOnTouchListener(new OnTouchListener() {
    public boolean onTouch(View v, MotionEvent event) {

    switch (event.getAction()) {
       case MotionEvent.ACTION_DOWN:
          mSoundBeep.start();
          break;

       case MotionEvent.ACTION_UP:
          if (mSoundBeep.isPlaying()) {
             mSoundBeep.stop();
          try {
                mSoundBeep.prepare();
             } catch (IllegalStateException e) {
                mSoundBeep.release();
                Context appCtx = getApplicationContext();
                mSoundBeep = MediaPlayer.create(appCtx, R.raw.beep);
             } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
             }
          }
          break;
    }

    return false;
    }



 });- Hide quoted text -

 - Show quoted text -

-- 
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] Change Default Package Name of R.java

2010-06-15 Thread Jeff Thorn
I looked into Library Projects, but I am not sure if that helps me. I assume
I would put the Activity in the library, since it is what is used by each
app. However, that Activity relies on String values from
res/values/strings. Each app will have different strings. Therefore the
activity calls R.string.something to get the string from the resource.

In order to make each app its own unique app, I need to change the package
attribute of manifest element in the AndroidManifest.xml. This has the
unfortunate side effect of generating the R class with the app's custom
package name. Therefore, when the Activity common code base tries to look up
a string using the R class, it cannot find the class since it has a
different package name.

At this point I am thinking about creating an Ant target to replace the
package name in R.java. However, I feel like there has to be a better way.

Am I overlooking something? Can this be accomplished with libraries?


On Tue, Jun 15, 2010 at 10:00 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jun 15, 2010 at 9:47 AM, Jeff jeff.th...@gmail.com wrote:
  Any other suggestions?

 Try the new library project featured added in the latest edition of
 the dev tools:


 http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject
 http://developer.android.com/guide/developing/other-ide.html#libraryProject

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.com
 http://commonsware.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.comandroid-developers%2bunsubscr...@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: Change Default Package Name of R.java

2010-06-15 Thread Jeff
That sounds exactly like what I need. When will the Froyo aapt be
available?


On Jun 15, 11:11 pm, Dianne Hackborn hack...@android.com wrote:
 The Froyo aapt will have a mechanism to build an existing package under a
 new name without modifying any of its source, manifest, or resources.



 On Tue, Jun 15, 2010 at 7:50 PM, Jeff Thorn jeff.th...@gmail.com wrote:
  I looked into Library Projects, but I am not sure if that helps me. I
  assume I would put the Activity in the library, since it is what is used by
  each app. However, that Activity relies on String values from
  res/values/strings. Each app will have different strings. Therefore the
  activity calls R.string.something to get the string from the resource.

  In order to make each app its own unique app, I need to change the
  package attribute of manifest element in the AndroidManifest.xml. This
  has the unfortunate side effect of generating the R class with the app's
  custom package name. Therefore, when the Activity common code base tries to
  look up a string using the R class, it cannot find the class since it has a
  different package name.

  At this point I am thinking about creating an Ant target to replace the
  package name in R.java. However, I feel like there has to be a better way.

  Am I overlooking something? Can this be accomplished with libraries?

  On Tue, Jun 15, 2010 at 10:00 AM, Mark Murphy 
  mmur...@commonsware.comwrote:

  On Tue, Jun 15, 2010 at 9:47 AM, Jeff jeff.th...@gmail.com wrote:
   Any other suggestions?

  Try the new library project featured added in the latest edition of
  the dev tools:

 http://developer.android.com/guide/developing/eclipse-adt.html#librar...

 http://developer.android.com/guide/developing/other-ide.html#libraryP...

  --
  Mark Murphy
  CommonsWare
  mmur...@commonsware.com
 http://commonsware.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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
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: Change Default Package Name of R.java

2010-06-15 Thread Jeff Thorn
Alsoif the Froyo aapt has this feature, does that mean I will only be
able to target 2.2 devices? I don't think that will be an option.

On Tue, Jun 15, 2010 at 11:15 PM, Jeff jeff.th...@gmail.com wrote:

 That sounds exactly like what I need. When will the Froyo aapt be
 available?


 On Jun 15, 11:11 pm, Dianne Hackborn hack...@android.com wrote:
  The Froyo aapt will have a mechanism to build an existing package under a
  new name without modifying any of its source, manifest, or resources.
 
 
 
  On Tue, Jun 15, 2010 at 7:50 PM, Jeff Thorn jeff.th...@gmail.com
 wrote:
   I looked into Library Projects, but I am not sure if that helps me. I
   assume I would put the Activity in the library, since it is what is
 used by
   each app. However, that Activity relies on String values from
   res/values/strings. Each app will have different strings. Therefore
 the
   activity calls R.string.something to get the string from the resource.
 
   In order to make each app its own unique app, I need to change the
   package attribute of manifest element in the AndroidManifest.xml.
 This
   has the unfortunate side effect of generating the R class with the
 app's
   custom package name. Therefore, when the Activity common code base
 tries to
   look up a string using the R class, it cannot find the class since it
 has a
   different package name.
 
   At this point I am thinking about creating an Ant target to replace the
   package name in R.java. However, I feel like there has to be a better
 way.
 
   Am I overlooking something? Can this be accomplished with libraries?
 
   On Tue, Jun 15, 2010 at 10:00 AM, Mark Murphy mmur...@commonsware.com
 wrote:
 
   On Tue, Jun 15, 2010 at 9:47 AM, Jeff jeff.th...@gmail.com wrote:
Any other suggestions?
 
   Try the new library project featured added in the latest edition of
   the dev tools:
 
  http://developer.android.com/guide/developing/eclipse-adt.html#librar.
 ..
 
  http://developer.android.com/guide/developing/other-ide.html#libraryP.
 ..
 
   --
   Mark Murphy
   CommonsWare
   mmur...@commonsware.com
  http://commonsware.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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

 --
 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.comandroid-developers%2bunsubscr...@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] Change Default Package Name of R.java

2010-06-15 Thread Jeff Thorn
Hi Dianne,
Can you clarify what that mechanism is? I tried adding the last to lines to
the and target that generates the resource classes. There isn't much
documentation, so I am not sure if I am using the correct parameters.

!-- Generates the R.java file for this project's resources. --
target name=-resource-src depends=-dirs
echoCustom Generating R.java / Manifest.java from the
resources.../echo
exec executable=${aapt} failonerror=true
arg value=package /
arg line=${v.option} /
arg value=-m /
arg value=-J /
arg path=${gen.absolute.dir} /
arg value=-M /
arg path=AndroidManifest.xml /
arg value=-S /
arg path=${resource.absolute.dir} /
arg value=-I /
arg path=${android.jar} /
 arg value=--rename-manifest-package/
 arg value=com.mybase.app/  !-- THIS IS THE PACKAGE NAME I WANT
R.java to have --
/exec
/target



On Tue, Jun 15, 2010 at 11:11 PM, Dianne Hackborn hack...@android.comwrote:

 The Froyo aapt will have a mechanism to build an existing package under a
 new name without modifying any of its source, manifest, or resources.

 On Tue, Jun 15, 2010 at 7:50 PM, Jeff Thorn jeff.th...@gmail.com wrote:

 I looked into Library Projects, but I am not sure if that helps me. I
 assume I would put the Activity in the library, since it is what is used by
 each app. However, that Activity relies on String values from
 res/values/strings. Each app will have different strings. Therefore the
 activity calls R.string.something to get the string from the resource.

 In order to make each app its own unique app, I need to change the
 package attribute of manifest element in the AndroidManifest.xml. This
 has the unfortunate side effect of generating the R class with the app's
 custom package name. Therefore, when the Activity common code base tries to
 look up a string using the R class, it cannot find the class since it has a
 different package name.

 At this point I am thinking about creating an Ant target to replace the
 package name in R.java. However, I feel like there has to be a better way.

 Am I overlooking something? Can this be accomplished with libraries?


 On Tue, Jun 15, 2010 at 10:00 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jun 15, 2010 at 9:47 AM, Jeff jeff.th...@gmail.com wrote:
  Any other suggestions?

 Try the new library project featured added in the latest edition of
 the dev tools:


 http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject

 http://developer.android.com/guide/developing/other-ide.html#libraryProject

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.com
 http://commonsware.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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

  --
 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.comandroid-developers%2bunsubscr...@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] Change Default Package Name of R.java

2010-06-15 Thread Jeff Thorn
Looks like I need to use the --custom-package parameter. Hope this helps
someone else out there.


On Tue, Jun 15, 2010 at 11:55 PM, Jeff Thorn jeff.th...@gmail.com wrote:

 Hi Dianne,
 Can you clarify what that mechanism is? I tried adding the last to lines to
 the and target that generates the resource classes. There isn't much
 documentation, so I am not sure if I am using the correct parameters.

 !-- Generates the R.java file for this project's resources. --
 target name=-resource-src depends=-dirs
 echoCustom Generating R.java / Manifest.java from the
 resources.../echo
 exec executable=${aapt} failonerror=true
 arg value=package /
 arg line=${v.option} /
 arg value=-m /
 arg value=-J /
 arg path=${gen.absolute.dir} /
 arg value=-M /
 arg path=AndroidManifest.xml /
 arg value=-S /
 arg path=${resource.absolute.dir} /
 arg value=-I /
 arg path=${android.jar} /
  arg value=--rename-manifest-package/
  arg value=com.mybase.app/  !-- THIS IS THE PACKAGE NAME I
 WANT R.java to have --
 /exec
 /target



 On Tue, Jun 15, 2010 at 11:11 PM, Dianne Hackborn hack...@android.comwrote:

 The Froyo aapt will have a mechanism to build an existing package under a
 new name without modifying any of its source, manifest, or resources.

 On Tue, Jun 15, 2010 at 7:50 PM, Jeff Thorn jeff.th...@gmail.com wrote:

 I looked into Library Projects, but I am not sure if that helps me. I
 assume I would put the Activity in the library, since it is what is used by
 each app. However, that Activity relies on String values from
 res/values/strings. Each app will have different strings. Therefore the
 activity calls R.string.something to get the string from the resource.

 In order to make each app its own unique app, I need to change the
 package attribute of manifest element in the AndroidManifest.xml. This
 has the unfortunate side effect of generating the R class with the app's
 custom package name. Therefore, when the Activity common code base tries to
 look up a string using the R class, it cannot find the class since it has a
 different package name.

 At this point I am thinking about creating an Ant target to replace the
 package name in R.java. However, I feel like there has to be a better way.

 Am I overlooking something? Can this be accomplished with libraries?


 On Tue, Jun 15, 2010 at 10:00 AM, Mark Murphy 
 mmur...@commonsware.comwrote:

 On Tue, Jun 15, 2010 at 9:47 AM, Jeff jeff.th...@gmail.com wrote:
  Any other suggestions?

 Try the new library project featured added in the latest edition of
 the dev tools:


 http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject

 http://developer.android.com/guide/developing/other-ide.html#libraryProject

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.com
 http://commonsware.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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

  --
 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.comandroid-developers%2bunsubscr...@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] How to test onCreate with saved Bundle?

2010-06-10 Thread Jeff
My app launches the camera to allow the user to capture a picture.
Sometimes this causes the OS will kill my App to free up memory for
the camera. Once the picture is taken, my app starts back up where it
left off using the Bundle I saved in onSaveInstanceState().

My app had a bug where in the code that restores the state. Is there
anyway that I can simulate or test this case to make sure I am
restoring correctly now? It seems I am having trouble making this
happen when I want to test it.

Thanks,
Jeff

-- 
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] Handling Orientation Changes that occur in another Activity

2010-06-03 Thread Jeff
I am having an interesting problem and would appreciate any advice. My
app uses WebView as its primary view. Using a javascript hook, it can
launch the camera so the user can take a picture. The camera is
launched using

Intent i = new
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

When the camera starts, it makes sense to use landscape mode, so the
user naturally turns the phone on its side. After the user takes a
picture, control returns to my launching Activity (actually, my
Acitivity gets restarted because it usually gets destroyed to free up
memory for the camera on my Moto Droid). When my WebView gets
recreated, I restore its state from the Bundle I saved in
onSaveInstanceState().

Now everything looks ok, except the phone is still in landscape mode.
However, when the user turns the phone upright bringing back into
portrait mode, my WebView takes up only half of the screen. Somewhere
along the way, the scale of my WebView got lost. This seems like such
a minor issue, but it is driving me crazy.

Does anyone have an idea why this might be happening? What is the
correct way to preserve the scale of my WebView? I am hesitant to hard
code any scale factors because what looks good on my device may not be
the same for another.

Thanks,
Jeff

-- 
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] Handling Orientation Changes that occur in another Activity

2010-06-03 Thread Jeff Thorn
Hi Rajiv,
What changes should I make? I am saving the state in onSaveInstanceState and
I am restoring the state in onCreate. I would think that the Bundle I saved
the state to should preserve all the WebView settings, but that does not
appear to be the case.

Jeff

On Thu, Jun 3, 2010 at 9:19 AM, Rajiv rajiv...@gmail.com wrote:

 Hi Jeff,

 I think your Browser won't get refressed.
 You need to make changes in *onConfigurationChanged* in that Activity.

 Regards,
 Rajiv


 On Thu, Jun 3, 2010 at 6:41 PM, Jeff jeff.th...@gmail.com wrote:

 I am having an interesting problem and would appreciate any advice. My
 app uses WebView as its primary view. Using a javascript hook, it can
 launch the camera so the user can take a picture. The camera is
 launched using

 Intent i = new
 Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

 When the camera starts, it makes sense to use landscape mode, so the
 user naturally turns the phone on its side. After the user takes a
 picture, control returns to my launching Activity (actually, my
 Acitivity gets restarted because it usually gets destroyed to free up
 memory for the camera on my Moto Droid). When my WebView gets
 recreated, I restore its state from the Bundle I saved in
 onSaveInstanceState().

 Now everything looks ok, except the phone is still in landscape mode.
 However, when the user turns the phone upright bringing back into
 portrait mode, my WebView takes up only half of the screen. Somewhere
 along the way, the scale of my WebView got lost. This seems like such
 a minor issue, but it is driving me crazy.

 Does anyone have an idea why this might be happening? What is the
 correct way to preserve the scale of my WebView? I am hesitant to hard
 code any scale factors because what looks good on my device may not be
 the same for another.

 Thanks,
 Jeff

 --
 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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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] Handling Orientation Changes that occur in another Activity

2010-06-03 Thread Jeff Thorn
Yes, I understand that. But my problem is that I don't want to make any
changes! :)  Yet somehow, the scale is changing somewhere along the line
between and I don't know the correct way to set it back. I don't want to
hard code any scale settings.


On Thu, Jun 3, 2010 at 9:39 AM, Rajiv rajiv...@gmail.com wrote:

 Hi Jeff,
 When you change the Phones orientations Activity onConfigurationChanged
 method got called, so you need to make changes in there.
 for ex.
 public void onConfigurationChanged(Configuration newConfig) {
  super.onConfigurationChanged(newConfig);
  //get Instance of the Browser say browser
  //set Content to the Browser
 }

 Regards,
 Rajiv

 On Thu, Jun 3, 2010 at 6:54 PM, Jeff Thorn jeff.th...@gmail.com wrote:

 Hi Rajiv,
 What changes should I make? I am saving the state in onSaveInstanceState
 and I am restoring the state in onCreate. I would think that the Bundle I
 saved the state to should preserve all the WebView settings, but that does
 not appear to be the case.

 Jeff

   On Thu, Jun 3, 2010 at 9:19 AM, Rajiv rajiv...@gmail.com wrote:

   Hi Jeff,

 I think your Browser won't get refressed.
 You need to make changes in *onConfigurationChanged* in that Activity.

 Regards,
 Rajiv


 On Thu, Jun 3, 2010 at 6:41 PM, Jeff jeff.th...@gmail.com wrote:

 I am having an interesting problem and would appreciate any advice. My
 app uses WebView as its primary view. Using a javascript hook, it can
 launch the camera so the user can take a picture. The camera is
 launched using

 Intent i = new
 Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

 When the camera starts, it makes sense to use landscape mode, so the
 user naturally turns the phone on its side. After the user takes a
 picture, control returns to my launching Activity (actually, my
 Acitivity gets restarted because it usually gets destroyed to free up
 memory for the camera on my Moto Droid). When my WebView gets
 recreated, I restore its state from the Bundle I saved in
 onSaveInstanceState().

 Now everything looks ok, except the phone is still in landscape mode.
 However, when the user turns the phone upright bringing back into
 portrait mode, my WebView takes up only half of the screen. Somewhere
 along the way, the scale of my WebView got lost. This seems like such
 a minor issue, but it is driving me crazy.

 Does anyone have an idea why this might be happening? What is the
 correct way to preserve the scale of my WebView? I am hesitant to hard
 code any scale factors because what looks good on my device may not be
 the same for another.

 Thanks,
 Jeff

 --
 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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@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: Handling Orientation Changes that occur in another Activity

2010-06-03 Thread Jeff Thorn
I have not defined these settings. I just want the WebView to fill the
entire screen. Until the camera is launched, the default layout and scaling
settings work just fine.

It looks like somewhere the Scale setting gets changed from 1.5 to 1.0 after
I call WebView.restoreState(). I don't want to hard code anything so I am
not sure of the best way to change it back.


On Thu, Jun 3, 2010 at 9:51 AM, greg sep...@eduneer.com wrote:

 You didn't mention if you've defined separate layout-land and layout-
 port for your activity.

 On Jun 3, 9:11 am, Jeff jeff.th...@gmail.com wrote:
  I am having an interesting problem and would appreciate any advice. My
  app uses WebView as its primary view. Using a javascript hook, it can
  launch the camera so the user can take a picture. The camera is
  launched using
 
  Intent i = new
  Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
 
  When the camera starts, it makes sense to use landscape mode, so the
  user naturally turns the phone on its side. After the user takes a
  picture, control returns to my launching Activity (actually, my
  Acitivity gets restarted because it usually gets destroyed to free up
  memory for the camera on my Moto Droid). When my WebView gets
  recreated, I restore its state from the Bundle I saved in
  onSaveInstanceState().
 
  Now everything looks ok, except the phone is still in landscape mode.
  However, when the user turns the phone upright bringing back into
  portrait mode, my WebView takes up only half of the screen. Somewhere
  along the way, the scale of my WebView got lost. This seems like such
  a minor issue, but it is driving me crazy.
 
  Does anyone have an idea why this might be happening? What is the
  correct way to preserve the scale of my WebView? I am hesitant to hard
  code any scale factors because what looks good on my device may not be
  the same for another.
 
  Thanks,
  Jeff

 --
 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.comandroid-developers%2bunsubscr...@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] We need developer feedback, STOP rating when customer has canceled order

2010-05-28 Thread Jeff
Please let us provide feedback on the market,  it hurt all of us
including Android!  The iPhone interface is so dumbed down that most
do not have problems.  I just got a bad rating because the user didn't
understand how Android works.
I attempted to explain the the user and he posted that the interface
was complicated.

thanks,

Jeff

-- 
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: Participate in app promotion experiment

2010-05-25 Thread Jeff Knaggs

Here's another number my app, punch, is not free. At the beginning
of John's advertising experiment, the price was $1.69. I showed no
change in order rates after the first ~5000 impressions, and
subsequently lowered the price after ~1 to $0.99.  At that point
there was a consistent daily average uptick. That increase accounted
for 1.43% of the 420 click-throughs. Another number I'll share (that
really can only be applied to my app) is the cancel ratio: ~43%
cancelled (uninstalled/refunded).

Background on my app so you don't read too much into the numbers. I
wrote punch to get my feet wet on the whole process: from learning
Java (new to me), wanted to experiment with accelerometer for
potential use in a much more complicated project, to marketing
strategies. It's a very simple app --uses accelerometer: waits for non-
movement (kind of), tracks movement, detects non-movement (kind of),
reports acceleration and time of movement (kind of).


That said, I consider these facts as other confounding variables:
(1) only on market for approx 7 days before the experiment started.
(2) for most phone owners I predict this is, at most, a try-once game,
get-bored, rarely use again (if at all)
(3) there is a free game by somebody else with same basic
functionality, not as polished (not that mine is exactly polished
either). As an aside the free game has a fairly large download count
and a youtube video with a bunch of teens (?) playing it (over 11,000
views). There is an iphone game as well, with youtube video (over 7000
views).
(4) my app does put an admob banner up (some people may not like this
and uninstall?)
(5) I purposely do not put this in any of the game categories as part
of my personal marketing testing is to play around with naming and
categorization. punch is under applications:health with my Market
text implying one can use it regularly as part of a metric for
exercise.


On May 24, 1:59 am, Maps.Huge.Info (Maps API Guru)
cor...@gmail.com wrote:
 Latest results:

           campaign          | hits_left | impressions | clicks | ctr
 +---+-++--
  Punching for Health        |      1253 |       28747 |    420 | 1.46

droid-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: android tablet emulator creation

2010-05-21 Thread Jeff
In Eclipse, select Window menu, launch Android SDK and AVD manager.
Create a new AVD with target Android 2.2 and set the resolution you
need.

On May 21, 2:23 pm, Nikhil Patil nikhilpatil2...@gmail.com wrote:
 Hi Jeff,

 Does Froyo SDK provides a skin for 1024X600? Or you created it? Can you
 enlighten us by giving a step-by-step walk-through? It will help a lot! :)

 Regards,
 Nikhil Patil

 On Fri, May 21, 2010 at 6:15 AM, Jeff codesec...@gmail.com wrote:
  Froyo SDK now allows to emulate tablet devices! Just tried with
  1024x600 screen size.

-- 
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] Handling Unsupported Content Types in WebView

2010-05-21 Thread Jeff
My app uses WebView to display most of its content, which it receives
from various remote sources. One of the pages I load has a link to a
URL that returns a PDF. The url gives no indication that it is a PDF.
Only the response content type shows it. Since webview does not appear
capable of displaying PDF's, the app does nothing when a user clicks
on this link.

I would expect there to be some method in WebViewClient that I can
override to catch this, but I can't seem to find one. onReceivedError
is not called. I don't believe anything else is.

Is there a way I can detect this and other unsupported content types
so I can at least display an error or do something? Right now the app
just does nothing, which is not acceptable.

Thanks!

Jeff

-- 
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: Avoid restarting background threads on orientation change

2010-05-20 Thread Jeff
Ok, I believe I have made a little progress on this. It looks like I
can use onRetainNonConfigurationInstance() to save an instance of my
thread objects and then call getLastNonConfigurationInstance() to get
them back when the Activity is restarted.

This leads me to a new questionwhen do I actually destroy the
threads then? Part of me is wondering if I even need to bother
destroying the threads - won't the OS do that automatically when it
needs to? One of the threads has an open database connection. I
imagine that should be handled more gracefully. The question is when
should I do this?

When an Activity starts, there is a way for you to tell if you have
saved state. When the Activity ends, I wish there was some reliable
way to determine whether the Activity is going to restart right away
or if its being destroyed for good.

Perhaps I am overlooking a fundamental aspect of the Activity
lifecycle in relation to background threads.

Any advice would be greatly appreciated.


On May 19, 5:45 pm, Jeff jeff.th...@gmail.com wrote:
 I start a number of background threads in my Activity onCreate that do
 work to keep the UI free. I was originally destroying these threads in
 onDestroy. However, the idea of shutting down and restarting these
 background threads every time there is an orientation change seems
 like a waste of time to me.

 What is the preferred way of avoiding the shutdown of my background
 threads on an orientation change? I supposed I could set a flag in
 onSaveInstanceState and then not destroy my threads if this flag is
 set. Is this a valid approach or is there a more standard framework
 approach that I am overlooking?

 Thanks,
 Jeff

 --
 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 
 athttp://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: Avoid restarting background threads on orientation change

2010-05-20 Thread Jeff Thorn
As always, thanks Mark!

I definitely see your point - its better to do short chunks of work in an
AsyncTask than creating long running background threads.

My app makes a lot of http requests. After the download is complete, it
updates a database. I thought it would be better to create a single
background thread that does this work and then notifies the UI when its
finished. I thought this would be more efficient than opening a network
connection, opening the database, doing work, closing the database, etc.
each and every time. I suppose I could open the database in the main
Activity thread and close that in onDestroy and pass it to the AsyncTask
each time.



On Thu, May 20, 2010 at 9:58 AM, Mark Murphy mmur...@commonsware.comwrote:

  This leads me to a new questionwhen do I actually destroy the
  threads then?

 As soon as their work is done. All else being equal, choose a model where
 you do not keep your own threads hanging out forever (e.g., use AsyncTask
 rather than forking your own threads).

  Part of me is wondering if I even need to bother
  destroying the threads - won't the OS do that automatically when it
  needs to?

 No, it will not, except by terminating the process, which may not happen
 for quite some time after your activity is destroyed. This yet another
 reason to use AsyncTask rather than forking your own threads -- threads
 *Android* forks *Android* is responsible to clean up.

 Moreover, please bear in mind that your activity may be in a stopped state
 for an extended period of time (a.k.a., days). Your goal, while stopped,
 should be to avoid doing anything much. This is yet another reason to
 design your application to avoid forking your own threads that hang around
 indefinitely, but rather do your background work in short discrete chunks
 in AsyncTasks.

  One of the threads has an open database connection. I
  imagine that should be handled more gracefully. The question is when
  should I do this?

 As soon as your work is done.

  When an Activity starts, there is a way for you to tell if you have
  saved state.

 In your case, if getLastNonConfigurationInstance() is not null, you have
 saved state, in the form of the object returned from
 getLastNonConfigurationInstance().

  When the Activity ends, I wish there was some reliable
  way to determine whether the Activity is going to restart right away
  or if its being destroyed for good.

 Call isFinishing().

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.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.comandroid-developers%2bunsubscr...@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: Avoid restarting background threads on orientation change

2010-05-20 Thread Jeff Thorn
I took your advice and refactored my code to replace any long living
background threads with AsyncTasks. Wow!!! I cannot begin to tell you how
much it simplified my code. Thank you so much for the very valuable advice.


On Thu, May 20, 2010 at 10:17 AM, Mark Murphy mmur...@commonsware.comwrote:

  My app makes a lot of http requests. After the download is complete, it
  updates a database. I thought it would be better to create a single
  background thread that does this work and then notifies the UI when its
  finished. I thought this would be more efficient than opening a network
  connection, opening the database, doing work, closing the database, etc.
  each and every time.

 IMHO, that's a premature optimization. Moreover, it does not preclude the
 use of AsyncTask:

  I suppose I could open the database in the main
  Activity thread and close that in onDestroy and pass it to the AsyncTask
  each time.

 Likewise, if you use an HttpClient with a ThreadSafeConnectionManager, you
 can do the same thing for your HTTP connections:


 http://svn.apache.org/repos/asf/httpcomponents/httpclient/tags/4.0.1/httpclient/src/examples/org/apache/http/examples/client/ClientMultiThreadedExecution.java

 (or http://bit.ly/cKW7ws if that URL is too long)

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.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.comandroid-developers%2bunsubscr...@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: android tablet emulator creation

2010-05-20 Thread Jeff
Froyo SDK now allows to emulate tablet devices! Just tried with
1024x600 screen size.

-- 
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] Avoid restarting background threads on orientation change

2010-05-19 Thread Jeff
I start a number of background threads in my Activity onCreate that do
work to keep the UI free. I was originally destroying these threads in
onDestroy. However, the idea of shutting down and restarting these
background threads every time there is an orientation change seems
like a waste of time to me.

What is the preferred way of avoiding the shutdown of my background
threads on an orientation change? I supposed I could set a flag in
onSaveInstanceState and then not destroy my threads if this flag is
set. Is this a valid approach or is there a more standard framework
approach that I am overlooking?

Thanks,
Jeff

-- 
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: Clarification on loading local images with WebView

2010-05-13 Thread Jeff
Thanks Mark. I could use some advice on the best approach to this
problem

The image that I am trying to display is very large and I want to
preserve its detail. So I am including it in the apk in the assets/
directory. My app almost exclusively uses WebView to display content.
I am trying to figure out the best way to show this large image from
one of the html pages loaded by my WebView.

1. Should I load it with my WebView? I thought I could use img tags
with urls like file:///android_asset/myimage.png. But this does not
seem to work.

2. Can I start a new Activity with an Intent that shows the image in
the default image viewer? This might be nice if it allows zooming and
scrolling. In this case, what is the URI I should use to an image in
my assets directory?

3. I can write my own Activity to load the image from my assets
directory. Does ImageView support zooming and scrolling?

Any advice on which of these approaches makes the most sense? Or is
there another approach that I am overlooking all together?

thanks,
Jeff

On May 12, 8:45 am, Mark Murphy mmur...@commonsware.com wrote:
 Jeff wrote:
  Hello all,
  I apologize if this is beating a dead horse, but I have been through
  the documentation and groups discussions over and over, and can't seem
  to resolve this issue

  What I want to do:
  - I am loading a remote web page into WebView using loadUrl() -
  example:  webView.loadUrl(http://myserver.com/page.html;);
  - That page has a very large image in it whose quality I do not want
  degraded by the OS. So I am putting it in the assets directory of the
  app.
  - The page.html that gets downloaded from my server, then has a
  regular img tag in it like so:
  img src=file:///android_asset/largeimage.png/

  I know there were some issues with reading assets from the file system
  with different versions of the platform. But its not clear what
  versions this affects and how to address the problem for all versions.
  Can someone please clarify:

  A) should what I am doing above work (because its not)

 Since you are loading the Web page from the Internet, I imagine WebView
 will block local file access. This is not significantly different than
 regular Web browsers, last I checked. Otherwise, Javascript could
 rummage around the local file system, grab data, and send it hither and
 proverbially yon.

  B) If it only works on some versions of the platform - which versions?
  How should this be addressed when I can't guarantee what version of
  the platform users are running?

 Try creating a ContentProvider to serve the image, and see if you have
 better luck with a content:// URL.

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

 _Android Programming Tutorials_ Version 2.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 
 athttp://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: Clarification on loading local images with WebView

2010-05-13 Thread Jeff Thorn
Regarding option 1 - if I create a content provider it appears I need to
implement the openFile method and return a ParcelFileDescriptor. Sounds easy
enough.  But how do you create a File object from something in the assets
directory?

On May 13, 2010 4:12 PM, Mark Murphy mmur...@commonsware.com wrote:

Jeff wrote:
 1. Should I load it with my WebView? I thought I could use img tags
 with urls like f...
As I wrote in my previous reply:


Try creating a ContentProvider to serve the image, and see if you have
better luck with a content:/...

 2. Can I start a new Activity with an Intent that shows the image in
 the default image viewer?
Not if your image is only in an asset. The image viewer won't have
rights to access it.


 3. I can write my own Activity to load the image from my assets
 directory. Does ImageView suppo...
Not directly, but you can use the 2D graphics API (e.g., Canvas and
friends). Basically, you're looking to use the same techniques games do
to view a portion of a large map, for example.

--

Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware...
Android Online Training: 21-25 June 2010: http://onlc.com


-- 
You received this message because you are subscribed to the Google
Groups Android Developers ...

-- 
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: Clarification on loading local images with WebView

2010-05-13 Thread Jeff Thorn
You would think huh? But I got the impression for the docs that that method
just allows you return a file segment using an offset and length.

Can you do something like:

File f = new File(assets/myfile.png);

I wish you could create a ParcelFileDescriptor with something Oberlin than a
File.

On May 13, 2010 6:51 PM, Mark Murphy mmur...@commonsware.com wrote:

Jeff Thorn wrote:
 Regarding option 1 - if I create a content provider it appears I need to
 imple...
Perhaps use openAssetFile() instead?

--

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

http://commonsware.com/blog | http://twitter.com/commonsguy
Android App Developer Books: http://commonsware.com/books


-- 
You received this message because you are subscribed to the Google

Groups Android Developers group.
To post to this group, send email to android-develop...@googlegro...

-- 
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: Clarification on loading local images with WebView

2010-05-13 Thread Jeff Thorn
PS - meant something OTHER than. Droid autospell. :)

On May 13, 2010 7:18 PM, Jeff Thorn jeff.th...@gmail.com wrote:

You would think huh? But I got the impression for the docs that that method
just allows you return a file segment using an offset and length.

Can you do something like:

File f = new File(assets/myfile.png);

I wish you could create a ParcelFileDescriptor with something Oberlin than a
File.



 On May 13, 2010 6:51 PM, Mark Murphy mmur...@commonsware.com wrote:


 Jeff Thorn wrote:
  Regarding option 1 - if I create a content provider it appears I need to
 imple...



 Perhaps use openAssetFile() instead?

 --

 Mark Murphy (a Commons Guy)
 http://commonswar...

Groups Android Developers group.
To post to this group, send email to android-develop...@googlegro...

-- 
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: Clarification on loading local images with WebView

2010-05-13 Thread Jeff Thorn
I appreciate your help. I think I will just open the large image in a new
custom Activity.

On May 13, 2010 7:38 PM, Mark Murphy mmur...@commonsware.com wrote:

Jeff Thorn wrote:
 PS - meant something OTHER than. Droid autospell. :)

 On May 13, 2010 7:18 P...

 mailto:jeff.th...@gmail.com wrote:

 You would think huh? But I got the impression for the d...
H...yeah, I was probably a bit too off-the-cuff with that
recommendation. I had done a ContentProvider to serve large images to a
WebView, but it wasn't an asset. It doesn't look like doing one from an
asset will be terribly simple.

Sorry!

--

Mark Murphy (a Commons Guy)

http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.c...
Android Training in NYC: 4-6 June 2010: http://guruloft.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 gr...

-- 
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] Clarification on loading local images with WebView

2010-05-12 Thread Jeff
Hello all,
I apologize if this is beating a dead horse, but I have been through
the documentation and groups discussions over and over, and can't seem
to resolve this issue

What I want to do:
- I am loading a remote web page into WebView using loadUrl() -
example:  webView.loadUrl(http://myserver.com/page.html;);
- That page has a very large image in it whose quality I do not want
degraded by the OS. So I am putting it in the assets directory of the
app.
- The page.html that gets downloaded from my server, then has a
regular img tag in it like so:
img src=file:///android_asset/largeimage.png/

I know there were some issues with reading assets from the file system
with different versions of the platform. But its not clear what
versions this affects and how to address the problem for all versions.
Can someone please clarify:

A) should what I am doing above work (because its not)

B) If it only works on some versions of the platform - which versions?
How should this be addressed when I can't guarantee what version of
the platform users are running?

I am targeting version 1.6 in my app because I thought that would be a
safe version to target. I am testing against version 2.0.1

Thanks,
Jeff

-- 
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: HTC Incredible - images not showing up in Gallery

2010-05-12 Thread Jeff
I have heard of some issues with the sdcard storage on the
incredible.  It's has the 8gb internal and the optional external.
This has caused some other applications problems because they look for
the sdcard (specifically the ny subway map app which stores the files
there).  I am not sure if the sdcard and internal storage are getting
confused inside the apps.

On May 9, 2:48 am, Martiño martino.figue...@gmail.com wrote:
 Hello,

 I'm making an alternative camera App. As you might expect my App
 involves taking pictures and saving them to the sdcard.

 On most phones (and the Emulator) everything works fine, pictures
 appear in the built-in Gallery App straight away.

 However on the HTC incredible images only appear when the user
 restarts the device. (I'm talking about an HTC Incredible phone with
 an sdcard, I know some of them shipped with internal storage only, but
 this is not the issue I'm talking about)

 The code I'm currently trying goes like this:

        public static boolean savePicture(Bitmap bitmap, int quality,
 String label, Context context) {

                 ContentResolver resolver = context.getContentResolver();

                 // Save the name and description of an image in a 
 ContentValues map.
                 ContentValues values = new ContentValues(3);

                 values.put(MediaStore.MediaColumns.MIME_TYPE, image/jpeg);
                 values.put(MediaStore.MediaColumns.TITLE, label + .jpg);

                 // Add a new record without the bitmap
                 Uri uri = resolver.insert(Media.EXTERNAL_CONTENT_URI, values);

                 // Get a handle to the file for that record, and save the 
 data into
 it.
                 try {
                         OutputStream outStream = 
 resolver.openOutputStream(uri);
                         bitmap.compress(Bitmap.CompressFormat.JPEG, quality, 
 outStream);
                         outStream.close();
                         context.sendBroadcast(new
 Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri));
                 } catch (Exception e) {
                         return false;
                 }
                 return true;
         }

 I've also tried MediaScannerConnection.scanFIle() with no luck.

 I wonder is the problem is due to the HTC incredible being originally
 designed to operate with internal storage only, maybe the Gallery App
 has issues with media stored on the sdcard.

 --
 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 
 athttp://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: PNG quality in WebView based app

2010-05-11 Thread Jeff
Wow! That must have driven you nuts trying to figure that one out.
What provider were you using?

Did you write a simple servlet or something that would serve the file
as application/octet-stream?


On May 10, 4:52 pm, Yahel kaye...@gmail.com wrote:
 I ran into the same problem a few monthes back.

 I spent hours trying to figure out why a webview would degrade the
 quality of an image.

 Turns out it was not the webview, it was my provider : When browsing
 the web on gprs or edge my provider downgrades image quality on their
 server so that its a lot lighter to download on their network.
 When I tried over wifi everything came back to normal.

 In the end I implemented a regular binary file download from my
 server, and then displayed that image.

 Yahel

 On 10 mai, 22:20, Jeff jeff.th...@gmail.com wrote:



  I am using WebView to display html content in an app. One of the pages
  has a rather large PNG image. The image is large and detailed on
  purpose because the idea is to use it as a map and allow users to zoom
  in to see the detail.

  Unfortunately, when the image is displayed with WebView, the quality
  is horrific. I am assuming that WebView is attempting to do some image
  optimization to reduce the size of the graphic.

  Is there anyway to prevent it from doing this? I don't want the image
  to lose any of its quality.

  Thanks,
  Jeff

  --
  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 
  athttp://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 
 athttp://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] shouldOverrideUrlLoading not getting called for file:///android_asset links

2010-05-11 Thread Jeff
I am using WebView to display web content in my app. Since I want to
keep all content in my webview and not launch the browser, I override
shouldOverrideUrlLoading and call loadUrl().  One of the pages has an
image that is very large, so I want to put it in the assets
directory.

When the user clicks on a link that starts with http:// everything
works fine. When they click on a link that starts with file:///android_asset,
shouldOverrideUrlLoading never gets called so my app never calls
loadUrl - hence nothing happens.

Anyone know why this is?

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] PNG quality in WebView based app

2010-05-10 Thread Jeff
I am using WebView to display html content in an app. One of the pages
has a rather large PNG image. The image is large and detailed on
purpose because the idea is to use it as a map and allow users to zoom
in to see the detail.

Unfortunately, when the image is displayed with WebView, the quality
is horrific. I am assuming that WebView is attempting to do some image
optimization to reduce the size of the graphic.

Is there anyway to prevent it from doing this? I don't want the image
to lose any of its quality.

Thanks,
Jeff

-- 
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: Stopping or Killing a Thread

2010-05-03 Thread Jeff
I don't know if this will help with your symptoms, but I'm just making
sure that the thread gets interrupted and the thread stops before the
surfaceDestroyed method returns.

If you interrupt a thread, the thread needs to expect the interrupt.

assuming that you are extending Thread (untested code)

public BallDropThread extends Thread{
//override run
public void run(){
while(!this.interrupted()){
//stuff to do
}
}
}
//then your surface destroy can look like this

public void surfaceDestroyed(SurfaceHolder holder) {
thread.interrupt(); //says that the thread should stop
try{
thread.join(); //make this thread wait for the other 
thread to
finish before returning
}catch(InterruptedException ie){
//handle the case if the thread.join is interrupt
//don't know if this will ever happen, if it can... 
throw a runtime
exception?, or reinterrupt?
Thread.currentThread().interrupt(); //reinterrupt 
because thrown
exception cleared interrupt and hope it's handled elsewhere
}
}

hope it helps
-Jeff

On Apr 30, 3:39 pm, Cameron.M.Johnson cameron.m.john...@gmail.com
wrote:
 The problem I am continuing to have is that SurfaceCreated gets called
 instead of onCreate when the app restarts. I was using the join()
 method which I thought terminates the thread but SurfaceCreated still
 gets called first.

 Is there a way to call onCreate from SurfaceCreated?

 Another solution I tried to just set the thread to a paused state (ie.
 setRunnable(false) ), and when the app restarts simply
 setRunnable(true) to run the thread again, but all I get is a black
 screen when I do this... All the settings, variables and graphics are
 loaded but nothing happens.

 On Apr 29, 10:51 pm, Anurag Singh anusingh...@gmail.com wrote:

  You can use Interrupt to strop a thread.

 http://java.sun.com/docs/books/tutorial/essential/concurrency/interru...

  - Anurag Singh

  On Fri, Apr 30, 2010 at 3:57 AM, Cameron.M.Johnson 

 --
 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 
 athttp://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] force WebView to wait for images

2010-04-23 Thread Jeff
When loading a page with WebView, images seem to appear one at a time
as they are downloaded or loaded from the cache. This gives the user
more of a browser type of experience instead of an app type of
experience.

Is there a way to make WebView wait until all images are ready on a
page before displaying the entire page?

Thanks,
Jeff

-- 
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] force WebView to wait for images

2010-04-23 Thread Jeff Thorn
Thanks Mark.

Strange - I didn't get your response yesterday. I also didn't see the post
ever appear on the discussion list. Thanks for answering it twice!



On Fri, Apr 23, 2010 at 12:10 PM, Mark Murphy mmur...@commonsware.comwrote:

 Jeff wrote:
  When loading a page with WebView, images seem to appear one at a time
  as they are downloaded or loaded from the cache. This gives the user
  more of a browser type of experience instead of an app type of
  experience.
 
  Is there a way to make WebView wait until all images are ready on a
  page before displaying the entire page?

 As I wrote when you asked this yesterday:

 At least for your initial page, you can make it invisible to start, then
 use a WebViewClient and onPageFinished() to find out when the page is
 fully-loaded, then make it visible. I've used this in conjunction with a
 custom RotateAnimation progress indicator, for example.

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

 _Beginning Android 2_ from Apress Now 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.comandroid-developers%2bunsubscr...@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] WebView wait for images

2010-04-22 Thread Jeff
When using WebView to load a page that has a number of images, the
images seem to appear one a time as they are available. This happens
even if the images are cached. This tends to give the user more of a
browser type of experience rather than an app type of experience.

Does anyone know if there is a way to make WebView wait until all of
the images are rendered before displaying the entire page?

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: android tablet emulator creation

2010-04-20 Thread Jeff
You can use image from androidx86 project in VirtualBox, but of course
I'd prefer working emulator from Google.

-- 
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] BUG in SQLite? Cannot use Long Integers in Cache Database

2010-04-13 Thread Jeff
Has anyone been able to get Long Integers to work with a SQLite DB on
Android?

In particular, I am noticing some odd behavior with Webkit's Cache
Database. The expires column is always 0. After doing some testing,
I realized that SQLite will accept a value in the expires column up
to (2^31 - 1). Anything higher than this, and the value is always 0.

The cache database uses Date.getTime() to populate this field. Since
this is a long, the value is always 0.

Is this a bug in the Cache Database or the SQLite implementation?

Jeff

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] BUG in SQLite? Cannot use Long Integers in Cache Database

2010-04-13 Thread Jeff Thorn
I spent 2 days trying to figure this out, and wouldn't you know it...2
minutes after posting to the group, I think I have figured out what I was
doing wrong.

In order to check my work, I was exporting the database to my local computer
and opening it with SQLite Administrator. The values were appearing as 0
because the affinity of this column in the database was set as INTEGER. So
it while is appeared that these values were getting stored as 0, in
actuality they were just getting displayed as 0 in SQLite Administrator.

The true value of these fields are indeed getting stored properly. I just
had to CAST(expires as NUMERIC) in order to view them.

Sorry for the false alarm.



On Tue, Apr 13, 2010 at 10:37 AM, Justin Giles jtgi...@gmail.com wrote:

 Here is a list of data types that are allowed in SQLite 3:
 http://www.sqlite.org/datatype3.html

 Note that there is no official long data type.  It would be classified as
 INTEGER or REAL.  For actual long data types that don't seem to be stored
 well in SQLite you might do better to store as TEXT and do a conversion
 outside of SQLite.

 I am by no means a database expert though, perhaps someone with more SQLite
 experience will chime in with a better explanation.

 Justin

 On Tue, Apr 13, 2010 at 9:18 AM, Jeff jeff.th...@gmail.com wrote:

 Has anyone been able to get Long Integers to work with a SQLite DB on
 Android?

 In particular, I am noticing some odd behavior with Webkit's Cache
 Database. The expires column is always 0. After doing some testing,
 I realized that SQLite will accept a value in the expires column up
 to (2^31 - 1). Anything higher than this, and the value is always 0.

 The cache database uses Date.getTime() to populate this field. Since
 this is a long, the value is always 0.

 Is this a bug in the Cache Database or the SQLite implementation?

 Jeff

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 To unsubscribe, reply using remove me as the subject.


  --
 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.comandroid-developers%2bunsubscr...@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] Contacts is missing a very important function

2010-03-26 Thread Jeff
On 1.5 at least, which I have not confirmed on subsequent releases, it
is not possible to search or see company name.  This doesn't seem to
be available via gmail on the web either.  I don't understand why
contacts should only be viewable and searchable by first and last
name, ONLY.  This is a must have function, especially for anyone using
these products for business.

Also, the contacts lookup feature doesn't really work as it should,
certainly not like other features.  You should be able to do a search
for a contact, pick a contact and if it is the wrong one use the back
button to get back to your search. In most applications the back
button gets you back to your previous page.  When looking up contacts
you get back to nothing.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] WebView HTML5 Cache Manifest

2010-03-26 Thread Jeff
Unless I am doing something wrong, it does not appear that WebView
supports the HTML5 cache manifest. Does anyone know if there are plans
to implement this in the SDK anytime soon?

Thanks,
Jeff

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Can we write android Junit testcases even we dont have source files?

2010-02-16 Thread Jeff
You should take a look at http://groups.csail.mit.edu/uid/sikuli/
 Its a pretty cool project for testing.

Not quite JUnit but the learning curve is pretty quick.

On Feb 15, 5:26 pm, pradeep gan@gmail.com wrote:
 Hi

 Can any one please help with answers for the below questions.

 1. Can we write android Junit Testcases for an application, without
 building the application
 In detail: I would like to test Calculator application and I dont have
 the Calculator Application source code.
 How Can I write Junit testcases in that case. Which testcase class I
 need to use for that.

 2.Can we write testcases interacting different applications.

-- 
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] adp1 doesn't connect via usb

2010-01-02 Thread Jeff Caldwell
I have an ADP1. When I connect it via a USB cable to either a Debian or an
Ubuntu machine, there is no allow notification icon nor does lsusb show
the ADP1 as a connected device. I tried a factory reset, which did not alter
the behavior.


Any ideas?

Jeff

-- 
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: CONTEXT_LOST GLSurfaceView

2009-12-22 Thread Jeff Boody
See 2.6 Power Management in the EGL specification:
http://www.khronos.org/registry/egl/specs/eglspec.1.4.20090908.pdf

The error EGL CONTEXT LOST will be returned if a power management
event has occurred.

I think the EGL_CONTEXT_LOST error is handled automatically by
GLSurfaceView.

If your application starts rendering again when comming out of stand-
by then I think it is ok.

--Jeff

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


  1   2   3   4   5   >