[android-developers] Re: Image to Video Converter In android

2013-08-02 Thread bobbybrend
Videos are encoded in many different formats for different devices and it 
is necessary to convert your videos to a format compatible with the Android 
operating system. Professional video conversion applications are expensive, 
but there are many free programs available for Macintosh and Windows 
operating systems that can convert your videos to play on Android mobile 
devices.
http://www.recovery-android.com/android-video-converter.html
http://www.recovery-android.com/convert-video-to-android.html

在 2012年4月9日星期一UTC+8下午3时52分56秒,Arun写道:
>
> hello all, 
>
> I want to convert a sequence of images in to video file in android. 
> and wants to share the file on facebook.  i had done lots of R&D and 
> uses FFmpeg library for the same, But no success. 
>
> please help me. 
> and id anyone have working code please provide me.. i am in deep 
> trouble. 
>
> 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
--- 
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] help needed.......

2013-08-02 Thread ramesh babu
suggest me a project in android which is not application
oriented??and it may be a ieee journal paper of 2013

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email 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] ContentResolver insert return null on 4.3

2013-08-02 Thread eli
This code works on all Android versions except on 4.3:

   ContentValues content = new ContentValues(4);
content.put(Video.VideoColumns.TITLE, "vid.mp4");
content.put(Video.VideoColumns.DATE_ADDED,
System.currentTimeMillis() / 1000);
content.put(Video.Media.MIME_TYPE, "video/mp4");
content.put(MediaStore.Video.Media.DATA, "/sdcard/vid.mp4");
ContentResolver resolver = getContentResolver();
   * Uri uri = 
resolver.insert(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,*
*content);*

On 4.3 *uri *is null.
Can someone help?

Thanks,
Eli

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




[android-developers] Re: Get the incoming caller name before phone starts to ring

2013-08-02 Thread shiva pendem
Hello Every one,

Thanks for your reply,
i thank all for helping me,

Thanks.
Shiva

On Tuesday, July 30, 2013 11:57:49 PM UTC+5:30, shiva pendem wrote:
>
> HI everyone,
>
>
> i am making an application to get the name of the contact no saved on the 
> mobile.
>
> i am using the following code
>
> private class *CallStateListener *extends *PhoneStateListener *{
> private String *displayContacts*(String incomingNumber) {
>  ContentResolver cr = ctx.getContentResolver();
> Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,
> null, null, null, null);
> if (cur.getCount() > 0) {
>  while (cur.moveToNext()) {
>  String id = 
> cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
>  String name = 
> cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
>  if (Integer.parseInt(cur.getString(
>
>  cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
>  Cursor pCur = cr.query(
>  ContactsContract.CommonDataKinds.Phone.CONTENT_URI, 
>  null, 
>  ContactsContract.CommonDataKinds.Phone.CONTACT_ID +" 
> = ?", 
>  new String[]{id}, null);
>  while (pCur.moveToNext()) {
>  String phoneNo = 
> pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
>  if(phoneNo.length()>9&&incomingNumber.length()>9)
>  {
>  // 
> Log.v("Test",phoneNo.substring(phoneNo.length()-10,phoneNo.length())+"   
> "+incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length()));
>  
> if(phoneNo.substring(phoneNo.length()-10,phoneNo.length()).equals(incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length(
>  {
>  Toast.makeText(ctx, "Name: " + name + ", Phone No: " 
> + phoneNo, Toast.LENGTH_SHORT).show();
>  Log.v("Test","qualified   "+phoneNo+"   "+name);
>  pCur.close();
>  return ""+name;
>  }
>  }
>  } 
>   pCur.close();
>   }
>  }
> }
> return "";
> }
> i am calling the *displayContacts() *method with the incoming call no as 
> argument
> but its taking about 18 to 29 seconds to get the contact name, some times 
> it is taking more than 35 seconds,
>
> can any one suggest me the best way to get the contact names saved in the 
> mobile,
> i need to get the contact name in the following manner,
> i have a contact with name as service call and no as 9848012345
> and if i get a call i should get the name in not more than 5 seconds .
>
> if there are any new mechanisms that are used to implement this mechanism 
> plese send me the links,
>
> Thanks
> Shiva Shankar,
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email 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] text to speech in broadcast receiver

2013-08-02 Thread shiva pendem
Hi,
i have written code to start services on receiving calls,

here is my code,

 */
public class CallHelper {
/**
 * Listener to detect incoming calls. 
 */
private class CallStateListener extends PhoneStateListener implements 
OnInitListener{
 @Override
public void onCallStateChanged(int state, String incomingNumber) {
boolean entered=false;
 switch (state) {
case TelephonyManager.CALL_STATE_RINGING:
// called when someone is ringing to this phone
String text="";
Log.v("Test","entered"+incomingNumber);
 Toast.makeText(ctx, 
"Incoming: "+incomingNumber, 
Toast.LENGTH_LONG).show();
// tts.setLanguage(Locale.US);
break;
case TelephonyManager.CALL_STATE_OFFHOOK:
 break;
}
}
public void onInit(int status) {
// TODO Auto-generated method stub
 }
 }
 /**
 * Broadcast receiver to detect the outgoing calls.
 */
public class OutgoingReceiver extends BroadcastReceiver implements
TextToSpeech.OnInitListener {
public TextToSpeech mTts;
public OutgoingReceiver() {
}

@Override
public void onReceive(Context context, Intent intent) {
   
}

public void onInit(int status) {
// TODO Auto-generated method stub
if (status == TextToSpeech.SUCCESS) {
if (mTts.isLanguageAvailable(Locale.UK) >= 0)

Toast.makeText( ctx,
"Sucessfull intialization of Text-To-Speech engine Mytell ",
Toast.LENGTH_LONG).show();
mTts.setLanguage(Locale.UK);

   

} else if (status == TextToSpeech.ERROR) {
Toast.makeText(ctx,
"Unable to initialize Text-To-Speech engine",
Toast.LENGTH_LONG).show();
}
}
}

  

private Context ctx;
private TelephonyManager tm;
private CallStateListener callStateListener;
 private OutgoingReceiver outgoingReceiver;

public CallHelper(Context ctx) {
this.ctx = ctx;
 callStateListener = new CallStateListener();
outgoingReceiver = new OutgoingReceiver();
}
 /**
 * Start calls detection.
 */
public void start() {
tm = (TelephonyManager) ctx.getSystemService(Context.TELEPHONY_SERVICE);
tm.listen(callStateListener, PhoneStateListener.LISTEN_CALL_STATE);
 IntentFilter intentFilter = new 
IntentFilter(Intent.ACTION_NEW_OUTGOING_CALL);
ctx.registerReceiver(outgoingReceiver, intentFilter);
 }
 /**
 * Stop calls detection.
 */
public void stop() {
tm.listen(callStateListener, PhoneStateListener.LISTEN_NONE);
ctx.unregisterReceiver(outgoingReceiver);
}

}


this code is showing the incoming no.
i want to stop the ringtone and start text to speech and say "hey boss u 
have a call", or other text,

i have tried a lot but failed, even i faced the issue of bound error for 
text to speech,

can any one make this and reply me the sample code please,

Thanks,
Shiva shankar,

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




[android-developers] Re: Do SQLiteDatabase references "go stale"?

2013-08-02 Thread Nobu Games
Oh my... when I think about that, I have a pretty old first generation 
Samsung Galaxy S (I9000). Its internal storage memory seems to be dying and 
quite a few apps behave erratically, including crashes and data loss. 
Sometimes it's stuck in an "infinite" reboot loop. So I'm pretty sure it 
won't last for too long.

I guess these are also probably things to watch out for when talking to 
customers (how old is their phone, do they store data on an external SD 
card, because these things can also break and silently corrupt your data. I 
lost a lot of photos and MP3s because of that :-)

It would be great if there were some system level tool for non-rooted 
devices to make a proper file system and storage integrity check...

On Wednesday, July 31, 2013 5:14:25 PM UTC-5, Kostya Vasilyev wrote:
>
>
>
> On Thursday, August 1, 2013 2:01:29 AM UTC+4, Nathan wrote:
>>
>>
>>  
>>
>>> In older Android versions that error was not treated gracefully and the 
>>> database file could get corrupted. In newer versions you are greeted with 
>>> an exception. When the database file gets corrupted, the default behavior 
>>> of SQLiteDatabase is "silently" dropping the whole database file and 
>>> creating a new one, so basically you start from scratch in such a situation 
>>> and probably your table creation / setup routines kick in and start fresh.
>>>
>>
>> Sounds horrible, and has probably happened to a few unfortunate users.  
>>
>
> Recent Android versions, too, have code to detect database being corrupted 
> and then delete and re-create (the database obviously loses all its data). 
> I see this happen in my app from time to time -- it's *extremely* rare and 
> *extremely* unpleasant to the users. Not sure what the origin of the issue 
> is - bugs in SQLite, or maybe flash memory going bad?
>
> As for not opening the same file, have you considered 
> File#getCanonicalPath?
>
> http://developer.android.com/reference/java/io/File.html#getCanonicalFile()
>
> Not sure if it'll properly resolve all those compatibility and profile 
> specific memory card paths that ICS/JB have, but perhaps it's worth a try?
>
> -- K
>  
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email 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] Yet another EGL_BAD_MATCH problem. How to do it the right way? For all devices?

2013-08-02 Thread Nobu Games
I have another rather rare problem with OpenGL ES which has to do with the 
dreaded EGL_BAD_MATCH problem.

I do know that there is a correlation between the following factors that 
yield that problem and make the game crash:

1. The Android device is most of the time rather old with a dated Android 
version (API level 8 to 10)
2. I explicitly set the surface view holder's pixel format to RGB_888
3. I request the following configuration: setEGLConfigChooser(8, 8, 8, 8, 
16, 8); (I have to admit that I probably don't need a 16 bits depth buffer, 
but I do need the 8 bits stencil buffer)

What I have read so far about this problem is the following "silver bullet" 
solution: just create your own config chooser. I get that point. But even 
then developers say on some forums  that it crashes on some devices, so 
apparently it's pretty difficult to find a good matching configuration that 
doesn't make OpenGL ES crash.

How to approach that problem reliably without having all these gazillion 
Android devices at your hands? Is there a good recipe for that, like a 
solid generic implementation of a chooser?

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




[android-developers] Re: ContentResolver insert return null on 4.3

2013-08-02 Thread Nobu Games
I just had a quick peek at the API level 14 source code and it looks like 
there are two possible reasons for that problem:

1. The actual ContentProvider the ContentResolver connected to returns null 
on insert (for whatever reason, that is a mystery)
2. A RemoteException was thrown during the insert operation. The exception 
is caught by the ContentResolver and it returns just null instead. The 
reason for that is (according to the source code comment) that the process 
/ app is about to die anyway.

Other ContentResolver methods behave exactly the same. Also the query 
methods. It can - without a warning - just return null, even though it 
works in your tests a million times.

You therefore need to check the result for null and come up with a strategy 
for coping with that problem, like scheduling a re-query or checking if 
your activity is about to be finished.

On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:
>
> This code works on all Android versions except on 4.3:
>
>ContentValues content = new ContentValues(4);
> content.put(Video.VideoColumns.TITLE, "vid.mp4");
> content.put(Video.VideoColumns.DATE_ADDED,
> System.currentTimeMillis() / 1000);
> content.put(Video.Media.MIME_TYPE, "video/mp4");
> content.put(MediaStore.Video.Media.DATA, "/sdcard/vid.mp4");
> ContentResolver resolver = getContentResolver();
>* Uri uri = 
> resolver.insert(MediaStore.Video.Media.EXTERNAL_CONTENT_URI,*
> *content);*
>
> On 4.3 *uri *is null.
> Can someone help?
>
> Thanks,
> Eli
>

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




[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-08-02 Thread Nobu Games
Hi Edvinas,

I need to ask again, because I think that may be the cause of the delay: 
how do you communicate the touch events to your rendering thread? Because 
Android can bombard your UI thread with lots of touch events in no time. 
But your rendering thread needs to "peek" before updating the game state in 
regular intervals into the current state of touch input. It's your game 
loop / rendering thread that needs to dictate the rhythm in order to 
synchronize the "whole experience".

What I do in my game is the following:

1. Touch input event handler receives all motion events on UI thread
---> converts motion event data into a custom data structure and puts it 
into one queue that belongs to UI thread

2. Simultaneously the game loop / render thread updates the game state and 
checks for input first:
---> It requests the data from touch handler in a thread safe manner 
(synchronized)
---> Touch handler internally swaps motion data queue A with a 
secondary motion data queue B
---> Touch handler returns queue A to game loop
---> Game loop / render thread processes queue data and recycles all motion 
data structures (so they can be re-used in order to avoid garbage 
collection activity)

And that repeats like this and these two queues get always swapped. That 
way you let your game loop determine the pace.

On Thursday, August 1, 2013 4:30:57 AM UTC-5, Edvinas Kilbauskas wrote:
>
> OK, I did that. And yes. It doesn't have the delay anymore! But the 
> problem is... It's Canvas. I don't need canvas, it doesn't fulfill my 
> needs. I need OpenGL.
> What the hell could be wrong? This is REALLY strange. OpenGL ES 1.0 has 
> delay, ES 1.1 has delay, ES 2.0 has delay. Canvas - no delay!
> This should be other way around, because as far as I know canvas uses 
> software rendering, while OpenGL uses hardware, which should be way faster!
> Any more ideas?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email 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: ContentResolver insert return null on 4.3

2013-08-02 Thread Eli Hasson
It always return null on 4.3, and works perfectly on all other versions.
On Aug 2, 2013 10:13 PM, "Nobu Games"  wrote:

> I just had a quick peek at the API level 14 source code and it looks like
> there are two possible reasons for that problem:
>
> 1. The actual ContentProvider the ContentResolver connected to returns
> null on insert (for whatever reason, that is a mystery)
> 2. A RemoteException was thrown during the insert operation. The exception
> is caught by the ContentResolver and it returns just null instead. The
> reason for that is (according to the source code comment) that the process
> / app is about to die anyway.
>
> Other ContentResolver methods behave exactly the same. Also the query
> methods. It can - without a warning - just return null, even though it
> works in your tests a million times.
>
> You therefore need to check the result for null and come up with a
> strategy for coping with that problem, like scheduling a re-query or
> checking if your activity is about to be finished.
>
> On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:
>>
>> This code works on all Android versions except on 4.3:
>>
>>ContentValues content = new ContentValues(4);
>> content.put(Video.**VideoColumns.TITLE, "vid.mp4");
>> content.put(Video.**VideoColumns.DATE_ADDED,
>> System.currentTimeMillis() / 1000);
>> content.put(Video.Media.MIME_**TYPE, "video/mp4");
>> content.put(MediaStore.Video.**Media.DATA,
>> "/sdcard/vid.mp4");
>> ContentResolver resolver = getContentResolver();
>>* Uri uri = resolver.insert(MediaStore.
>> Video.Media.EXTERNAL_CONTENT_URI,*
>> *content);*
>>
>> On 4.3 *uri *is null.
>> Can someone help?
>>
>> Thanks,
>> Eli
>>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email 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/I-nzRB0w6DM/unsubscribe
> .
> 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: ContentResolver insert return null on 4.3

2013-08-02 Thread Nobu Games
Sorry Eli,

I should have read your code more carefully. You're hard-coding file paths 
in that insert request which is bad practice. You cannot assume that there 
paths like "/sdcard/..." on all Android devices. They can be named 
completely differently depending on device / manufacturer and especially on 
Jelly Bean there's  something like a "virtual file system" for supporting 
multiple user accounts and these file paths look totally different.

You should make use of the context.getExternalStorage(...) and related 
methods (also look into the Environment class).

Maybe the hard-coded file path is the problem there?

On Friday, August 2, 2013 2:20:50 PM UTC-5, eli wrote:
>
> It always return null on 4.3, and works perfectly on all other versions.
> On Aug 2, 2013 10:13 PM, "Nobu Games" > 
> wrote:
>
>> I just had a quick peek at the API level 14 source code and it looks like 
>> there are two possible reasons for that problem:
>>
>> 1. The actual ContentProvider the ContentResolver connected to returns 
>> null on insert (for whatever reason, that is a mystery)
>> 2. A RemoteException was thrown during the insert operation. The 
>> exception is caught by the ContentResolver and it returns just null 
>> instead. The reason for that is (according to the source code comment) that 
>> the process / app is about to die anyway.
>>
>> Other ContentResolver methods behave exactly the same. Also the query 
>> methods. It can - without a warning - just return null, even though it 
>> works in your tests a million times.
>>
>> You therefore need to check the result for null and come up with a 
>> strategy for coping with that problem, like scheduling a re-query or 
>> checking if your activity is about to be finished.
>>
>> On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:
>>>
>>> This code works on all Android versions except on 4.3:
>>>
>>>ContentValues content = new ContentValues(4);
>>> content.put(Video.**VideoColumns.TITLE, "vid.mp4");
>>> content.put(Video.**VideoColumns.DATE_ADDED,
>>> System.currentTimeMillis() / 1000);
>>> content.put(Video.Media.MIME_**TYPE, "video/mp4");
>>> content.put(MediaStore.Video.**Media.DATA, 
>>> "/sdcard/vid.mp4");
>>> ContentResolver resolver = getContentResolver();
>>>* Uri uri = resolver.insert(MediaStore.
>>> Video.Media.EXTERNAL_CONTENT_URI,*
>>> *content);*
>>>
>>> On 4.3 *uri *is null.
>>> Can someone help?
>>>
>>> Thanks,
>>> Eli
>>>
>>  -- 
>> -- 
>> 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 a topic in the 
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/android-developers/I-nzRB0w6DM/unsubscribe
>> .
>> 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: ContentResolver insert return null on 4.3

2013-08-02 Thread Eli Hasson
Thanks for your answer, I just entered hard coded values there to make the
code more clear, this is not the issue.

Eli
On Aug 2, 2013 10:29 PM, "Nobu Games"  wrote:

> Sorry Eli,
>
> I should have read your code more carefully. You're hard-coding file paths
> in that insert request which is bad practice. You cannot assume that there
> paths like "/sdcard/..." on all Android devices. They can be named
> completely differently depending on device / manufacturer and especially on
> Jelly Bean there's  something like a "virtual file system" for supporting
> multiple user accounts and these file paths look totally different.
>
> You should make use of the context.getExternalStorage(...) and related
> methods (also look into the Environment class).
>
> Maybe the hard-coded file path is the problem there?
>
> On Friday, August 2, 2013 2:20:50 PM UTC-5, eli wrote:
>>
>> It always return null on 4.3, and works perfectly on all other versions.
>> On Aug 2, 2013 10:13 PM, "Nobu Games"  wrote:
>>
>>> I just had a quick peek at the API level 14 source code and it looks
>>> like there are two possible reasons for that problem:
>>>
>>> 1. The actual ContentProvider the ContentResolver connected to returns
>>> null on insert (for whatever reason, that is a mystery)
>>> 2. A RemoteException was thrown during the insert operation. The
>>> exception is caught by the ContentResolver and it returns just null
>>> instead. The reason for that is (according to the source code comment) that
>>> the process / app is about to die anyway.
>>>
>>> Other ContentResolver methods behave exactly the same. Also the query
>>> methods. It can - without a warning - just return null, even though it
>>> works in your tests a million times.
>>>
>>> You therefore need to check the result for null and come up with a
>>> strategy for coping with that problem, like scheduling a re-query or
>>> checking if your activity is about to be finished.
>>>
>>> On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:

 This code works on all Android versions except on 4.3:

ContentValues content = new ContentValues(4);
 content.put(Video.**VideoColumn**s.TITLE, "vid.mp4");
 content.put(Video.**VideoColumn**s.DATE_ADDED,
 System.currentTimeMillis() / 1000);
 content.put(Video.Media.MIME_TYPE, "video/mp4");
 content.put(MediaStore.Video.Media.DATA,
 "/sdcard/vid.mp4");
 ContentResolver resolver = getContentResolver();
* Uri uri = resolver.insert(MediaStore.Vid
 eo.Media.EXTERNAL_CONTENT_URI,*
 *content);*

 On 4.3 *uri *is null.
 Can someone help?

 Thanks,
 Eli

>>>  --
>>> --
>>> 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 a topic in the
>>> Google Groups "Android Developers" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/android-developers/I-**nzRB0w6DM/unsubscribe
>>> .
>>> 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/I-nzRB0w6DM/unsubscribe
> .
> 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.go

Re: [android-developers] Re: ContentResolver insert return null on 4.3

2013-08-02 Thread Nobu Games
Is there anything in log cat related to MediaStore?

On Friday, August 2, 2013 2:43:17 PM UTC-5, eli wrote:
>
> Thanks for your answer, I just entered hard coded values there to make the 
> code more clear, this is not the issue.
>
> Eli
> On Aug 2, 2013 10:29 PM, "Nobu Games" > 
> wrote:
>
>> Sorry Eli,
>>
>> I should have read your code more carefully. You're hard-coding file 
>> paths in that insert request which is bad practice. You cannot assume that 
>> there paths like "/sdcard/..." on all Android devices. They can be named 
>> completely differently depending on device / manufacturer and especially on 
>> Jelly Bean there's  something like a "virtual file system" for supporting 
>> multiple user accounts and these file paths look totally different.
>>
>> You should make use of the context.getExternalStorage(...) and related 
>> methods (also look into the Environment class).
>>
>> Maybe the hard-coded file path is the problem there?
>>
>> On Friday, August 2, 2013 2:20:50 PM UTC-5, eli wrote:
>>>
>>> It always return null on 4.3, and works perfectly on all other versions.
>>> On Aug 2, 2013 10:13 PM, "Nobu Games"  wrote:
>>>
 I just had a quick peek at the API level 14 source code and it looks 
 like there are two possible reasons for that problem:

 1. The actual ContentProvider the ContentResolver connected to returns 
 null on insert (for whatever reason, that is a mystery)
 2. A RemoteException was thrown during the insert operation. The 
 exception is caught by the ContentResolver and it returns just null 
 instead. The reason for that is (according to the source code comment) 
 that 
 the process / app is about to die anyway.

 Other ContentResolver methods behave exactly the same. Also the query 
 methods. It can - without a warning - just return null, even though it 
 works in your tests a million times.

 You therefore need to check the result for null and come up with a 
 strategy for coping with that problem, like scheduling a re-query or 
 checking if your activity is about to be finished.

 On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:
>
> This code works on all Android versions except on 4.3:
>
>ContentValues content = new 
> ContentValues(4);
> content.put(Video.**VideoColumn**s.TITLE, "vid.mp4");
> content.put(Video.**VideoColumn**s.DATE_ADDED,
> System.currentTimeMillis() / 1000);
> content.put(Video.Media.MIME_TYPE, "video/mp4");
> content.put(MediaStore.Video.Media.DATA, 
> "/sdcard/vid.mp4");
> ContentResolver resolver = getContentResolver();
>* Uri uri = resolver.insert(MediaStore.Vid
> eo.Media.EXTERNAL_CONTENT_URI,*
> *content);*
>
> On 4.3 *uri *is null.
> Can someone help?
>
>  Thanks,
> Eli
>
  -- 
 -- 
 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 a topic in the 
 Google Groups "Android Developers" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/**
 topic/android-developers/I-**nzRB0w6DM/unsubscribe
 .
 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-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 a topic in the 
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/android-developers/I-nzRB0w6DM/unsubscribe
>> .
>> 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 su

Re: [android-developers] Re: ContentResolver insert return null on 4.3

2013-08-02 Thread Eli Hasson
Yep,
Looks like I found the issue:
08-02 23:11:54.524: E/SQLiteDatabase(11214): Error inserting
bucket_id=1643208667 media_type=3 title=out.mp4 storage_id=65537
mime_type=video/mp4 date_modified=1375474313 _display_name=out.mp4
date_added=1375474314 parent=1184 _size=325469 format=12299
_data=/storage/emulated/0/compressed/out.mp4 bucket_display_name=compressed
08-02 23:11:54.524: E/SQLiteDatabase(11214):
android.database.sqlite.SQLiteConstraintException: column _data is not
unique (code 19)

The thing is, Google changed the functionality of the insert, seems that
column data must be unique.

Eli


On Fri, Aug 2, 2013 at 11:02 PM, Nobu Games wrote:

> Is there anything in log cat related to MediaStore?
>
>
> On Friday, August 2, 2013 2:43:17 PM UTC-5, eli wrote:
>
>> Thanks for your answer, I just entered hard coded values there to make
>> the code more clear, this is not the issue.
>>
>> Eli
>> On Aug 2, 2013 10:29 PM, "Nobu Games"  wrote:
>>
>>> Sorry Eli,
>>>
>>> I should have read your code more carefully. You're hard-coding file
>>> paths in that insert request which is bad practice. You cannot assume that
>>> there paths like "/sdcard/..." on all Android devices. They can be named
>>> completely differently depending on device / manufacturer and especially on
>>> Jelly Bean there's  something like a "virtual file system" for supporting
>>> multiple user accounts and these file paths look totally different.
>>>
>>> You should make use of the context.getExternalStorage(...**) and
>>> related methods (also look into the Environment class).
>>>
>>> Maybe the hard-coded file path is the problem there?
>>>
>>> On Friday, August 2, 2013 2:20:50 PM UTC-5, eli wrote:

 It always return null on 4.3, and works perfectly on all other versions.
 On Aug 2, 2013 10:13 PM, "Nobu Games"  wrote:

> I just had a quick peek at the API level 14 source code and it looks
> like there are two possible reasons for that problem:
>
> 1. The actual ContentProvider the ContentResolver connected to returns
> null on insert (for whatever reason, that is a mystery)
> 2. A RemoteException was thrown during the insert operation. The
> exception is caught by the ContentResolver and it returns just null
> instead. The reason for that is (according to the source code comment) 
> that
> the process / app is about to die anyway.
>
> Other ContentResolver methods behave exactly the same. Also the query
> methods. It can - without a warning - just return null, even though it
> works in your tests a million times.
>
> You therefore need to check the result for null and come up with a
> strategy for coping with that problem, like scheduling a re-query or
> checking if your activity is about to be finished.
>
> On Friday, August 2, 2013 12:29:31 PM UTC-5, eli wrote:
>>
>> This code works on all Android versions except on 4.3:
>>
>>ContentValues content = new
>> ContentValues(4);
>> content.put(Video.**VideoColumns.TITLE, "vid.mp4");
>> content.put(Video.**VideoColumns.DATE_ADDED,
>> System.currentTimeMillis() / 1000);
>> content.put(Video.Media.MIME_**TYPE, "video/mp4");
>> content.put(MediaStore.Video.**Media.DATA,
>> "/sdcard/vid.mp4");
>> ContentResolver resolver = getContentResolver();
>>* Uri uri = resolver.insert(MediaStore.Vid
>> eo.Media.EXTERNAL_CONTENT_URI,*
>> *content);*
>>
>> On 4.3 *uri *is null.
>> Can someone help?
>>
>>  Thanks,
>> Eli
>>
>  --
> --
> 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+**unsubscribe**@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/**to
> **pic/android-developers/I-**nzRB0**w6DM/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+**unsubscribe**@googlegroups.com.
> For more options, visit 
> https://groups.google.com/**grou**ps/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 and

[android-developers] in-app purchase of another app?

2013-08-02 Thread Steve Gabrilowitz
I have an app that has been in the play store for a while with 2 different 
flavors:  an ad funded free version and an ad-free version with all the 
exact same features.  Now I am adding a bunch of new features and want to 
make a 3rd flavor so that users can choose whether they want to pay extra 
for the extra functionality.  The question here comes how to handle my 
current customers of the "lite" version, I want to give them an upgrade 
opportunity and not make them pay full price for the "pro" version.  Way 
back when I started working on the "pro" features what I had planned to do 
was to have those folks who wanted to upgrade just buy the pro version 
normally, and I would give them a partial refund.  But now "pro" is almost 
ready for release and Google has taken away my ability to issue a partial 
refund, and even my ability to look up an order by name or e-mail (I HATE 
that, WHY did they do that?)

What would be ideal would be if I could allow them to purchase the pro 
version from the play store at a discount if they do it via an in-app 
purchase from within the "lite" version.  Is such a thing possible?  If so, 
can I get a pointer or 2 on how to implement it or if not then any other 
ideas on how to accomplish my objective?

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 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] in-app purchase of another app?

2013-08-02 Thread TreKing
On Fri, Aug 2, 2013 at 4:07 PM, Steve Gabrilowitz wrote:

>   Way back when I started working on the "pro" features what I had planned
> to do was to have those folks who wanted to upgrade just buy the pro
> version normally, and I would give them a partial refund.  But now "pro" is
> almost ready for release and Google has taken away my ability to issue a
> partial refund
>

AFAIK, partial refunds was never something you could do. It was an option
in the Google Checkout interface, but it was not actually possible to do
it. It's all or nothing.


> , and even my ability to look up an order by name or e-mail (I HATE that,
> WHY did they do that?)
>

Maybe I haven't been updated to the latest and greatest Wallet experience,
but I can still do that ...


> What would be ideal would be if I could allow them to purchase the pro
> version from the play store at a discount if they do it via an in-app
> purchase from within the "lite" version.  Is such a thing possible?  If so,
> can I get a pointer or 2 on how to implement it or if not then any other
> ideas on how to accomplish my objective?
>

Sounds like you have to add the features to your "lite" version, locked
behind an in-app purchase. I don't think you can do what you want with two
different paid versions.

Side note: adding an in-app purchase to already paid app is probably not
going to fly well with most users. Good luck.

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Control temperature in software

2013-08-02 Thread andrew_esh
My Samsung Galaxy S3 can report the battery temperature. There are a few 
examples of sensor apps in Google Play. I doubt all devices have a 
temperature sensor.

See TYPE_AMBIENT_TEMPERATURE in android.hardware.Sensor.


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




[android-developers] Re: Do SQLiteDatabase references "go stale"?

2013-08-02 Thread Nathan
I have got back two nonfatal exception reports. I can't match them to any 
particular user yet. 

When attempting the open. 
android.database.sqlite.SQLiteCantOpenDatabaseException unknown error (code 
14): Could not open database
From: 
SQLiteDatabase.java line 669android.database.sqlite.SQLiteDatabase.openDatabase 

Another, when checking for a record's existence:
android.database.sqlite.SQLiteDiskIOException disk I/O error
from
SQLiteCursor.java line 268 
android.database.sqlite.SQLiteCursor.getCount 

They appear to be pretty rare. No sign it is tied to a corrupt database. 

Nathan

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




[android-developers] Re: in-app purchase of another app?

2013-08-02 Thread Nathan


On Friday, August 2, 2013 2:07:46 PM UTC-7, Steve Gabrilowitz wrote:
>
> I have an app that has been in the play store for a while with 2 different 
> flavors:  an ad funded free version and an ad-free version with all the 
> exact same features.  Now I am adding a bunch of new features and want to 
> make a 3rd flavor so that users can choose whether they want to pay extra 
> for the extra functionality.  

 
So you will then have three apps in market? lite(free with ads), full(paid, 
no ads), and pro(paid, extra features)?

The question here comes how to handle my current customers of the "lite" 
> version, I want to give them an upgrade opportunity and not make them pay 
> full price for the "pro" version.  


What do you owe these guys that have always been too cheap to pay your full 
version? And are they the type that ever buys paid apps, anyway?

And meanwhile, the guys who paid for your ad free version, they do have to 
pay again?

Seems a little backwards, but I probably don't understand.
 

> Way back when I started working on the "pro" features what I had planned 
> to do was to have those folks who wanted to upgrade just buy the pro 
> version normally, and I would give them a partial refund. 

If you are doing that much manual work for each user, I'd charge them 
extra, not less. 

The number of users who will be motivated to buy based on a few dollars of 
discount that requires them to contact you might not be very high - but 
maybe that's what you are counting on, you won't have to pay many of the 
refunds.   

Here's another option - use a house ad announcing to users of your lite 
version of a special date and time when they can get the other version at a 
reduced price. They will be the only ones to know about it, and you can 
change the price temporarily in the console.  

Nathan

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email 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] in-app purchase of another app?

2013-08-02 Thread Nathan


On Friday, August 2, 2013 3:09:57 PM UTC-7, TreKing wrote:

>
> Side note: adding an in-app purchase to already paid app is probably not 
> going to fly well with most users. Good luck.
>

Or, as with me, it could turn out to be the smartest thing you ever did and 
fly extremely well. Just saying and YMMV and so forth. 

Nathan

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email 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.