[android-developers] Own app dialer

2015-12-18 Thread Руслан Подурец


Wanna to implement own dialer activity, but don't know how to show chooser, 
where user can choose my app as dialer. Found billions link how to catch 
calls or open chooser like this: link 


But this not fits to me. Need only to show chooser dialer dialog without 
make call after choose. Just only choose default dialer.


I added uses permission to manifest:



Also added a lot intent filters to activity:











































I tried different ways, but cannot find right solution how to show chooser 
dialog, where user can choose default app for dial.
F.e:

Intent selector = new Intent(Intent.ACTION_DIAL);
selector.setData(Uri.parse("tel:598578"));
startActivity(selector);  - This not right, and not works - want only to 
show chooser, where user can choose app.  

Intent selector = new Intent(Intent.ACTION_DIAL);
startActivity(selector); - not works.

try {
Intent dial = new Intent(Intent.ACTION_DIAL);
dial.addCategory(Intent.CATEGORY_DEFAULT);
startActivity(Intent.createChooser(dial, "Choose dialer..."));
} catch (Exception e) {
Toast.makeText(StartTest.this, "Activity not found", 
Toast.LENGTH_LONG).show();
} - Not works


Will be glad any link or proposals.

-- 
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/952673a0-824b-4bef-aa2f-de6db26b0577%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] InAppPurchase: Consumption Request to Google Play

2015-12-18 Thread Andre
Hello,

i want to add some consumable in app items for my game. But the only choice 
is:

- Managed Item
- Abo

The documentation says:

Before provisioning the consumable in-app product in your application, you 
> must send a consumption request to Google Play and receive a successful 
> response indicating that the consumption was recorded.

 
But where i can do that?

Thank you and best regards

Andre 

-- 
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/ad7a98da-53a4-485f-807d-8157143277d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Update version android studio from 1.2 to 1.5 problem with project

2015-12-18 Thread Andrea Bo
Hi All,
I have a problem after install android studio 1.5 , I have import a project 
but now i can see only .idea folder and i dont find other folders of this 
project on my pc.
Other problem is gradle give me error connection time out ( proxy setting ) 
but the ide's updates working.
Someone say if i can rebuid the project from apk?? 

-- 
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/e183b502-aeb8-4492-ae5d-be98ba288326%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Build app using video camera that stores separate preferences and doesn't prompt to save videos

2015-12-18 Thread gjs
Hi,

See http://developer.android.com/guide/topics/media/camera.html#capture-video

For (1) As per the link provided, ordinarily the video is saved to (the 
nominated) file automatically, there is no prompt to save or discard the 
(video) file, that would require extra effort if you did wish to discard 
the file, via a Dialog screen of some sort.

For (2) You can save (and read) your custom "camera" properties as Key 
Value pairs from persistent memory using SharedPreferences, 
see 
http://developer.android.com/reference/android/content/SharedPreferences.html 

If you wish to edit your custom "camera" property values you probably need 
to develop an Activity screen or perhaps just a Dialog if you only have a 
few things to configure for the camera.

Regards

On Friday, December 18, 2015 at 6:07:13 AM UTC+11, David Karr wrote:
>
> I'm a very experienced Java dev, but an Android dev newbie (although I 
> went through a lot of Eclipse-based Android dev tutorials years ago).
>
> I'm starting with a simple open-source app that runs the camcorder 
> (probably mostly based on a tutorial itself).
>
> Using a remote bluetooth button device, I can start the app recording.  I 
> can use the same device to stop the recording.  On the app, this brings up 
> a "Save" or "Discard" prompt.  When I click "Save", this saves the video 
> and then I can click again to get back to the camcorder screen, where I 
> could then click the record button again.
>
> Starting with this, I'm wondering how difficult it would be to implement 
> the following features:
>
> 1. When I click the "stop recording" button, either with the app in front 
> of me or with the remote bluetooth button (the primary use case), I want it 
> to just save the video and immediately return to the camcorder screen.  
> This is the most important feature.
>
> 2. The preferences for the app are the common "camera" preferences.  I'd 
> like to store separate preferences for this, particularly the shutter delay 
> (I would make it ten seconds by default). This is not critical, although 
> from the tutorials I went through a few years ago, I think I understand the 
> basic steps for this.
>
> As I said, the first feature is the most important.  If I can't do that, I 
> won't bother with this.
>
> Could someone outline the basic elements of a solution for this?
>

-- 
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/5fa9323a-4e2f-4f35-b536-06ca9717438e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] jobscheduler how to

2015-12-18 Thread Zhihong GUO
Hello,

I create a jobscheduler in onReceive method of boot complete receiver. The
job is not scheduled to run after two minutes. The device is in idle and
wi-fi connected.

Can anyone give help?

Thanks,

James

public void onReceive(Context context, Intent intent) {

JobScheduler tm =
(JobScheduler)
context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
tm.cancel(JOB_ID);

JobInfo.Builder builder = new JobInfo.Builder(JOB_ID, new
ComponentName(context, TestService.class));
builder.setPeriodic(TWO_MINUTES);
builder.setPersisted(true);
builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED);
builder.setRequiresDeviceIdle(true);

tm.schedule(builder.build());
}

then in the TestService


@Override
public boolean onStartJob(final JobParameters params) {

Log.i(LOG_TAG, "job started");

new Thread(new Runnable() {
@Override
public void run() {
//do something here, then call jobFinished
jobFinished(params, true);
}
}).start();

return true;
}

-- 
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/CAMhUYgyqqBqBsqpwo%2BqYm%3DEdF_Ff-e1_q1%3D%2B-32X_5uU8PvY4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] BadTokenException thrown not associated with a Dialog

2015-12-18 Thread Rui Varela
Hi All,

I've been searching for causes 
for android.view.WindowManager$BadTokenException,

but most answers are related with dialog.show() being run at improper time,
in my stack trace there is no call for for any dialog show,
our crashllitics is showing that we experiencing this with a very low 
incident rate, but when it happens... it is a crash
we cannot pinpoint to a specific Activity or Fragment


Fatal Exception: android.view.WindowManager$BadTokenException: Unable to 
add window -- token android.os.BinderProxy@1edb37c0 is not valid; is your 
activity running?
   at android.view.ViewRootImpl.setView(ViewRootImpl.java:562)
   at 
android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:272)
   at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
   at 
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3073)
   at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2398)
   at 
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3968)
   at android.app.ActivityThread.access$1000(ActivityThread.java:151)
   at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1312)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:135)
   at android.app.ActivityThread.main(ActivityThread.java:5277)
   at java.lang.reflect.Method.invoke(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:372)
   at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:913)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:708)


has anyone had this problem in the past?
if so, how to fix it?

Thanks
Rui

-- 
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/cd99c9eb-ab2f-4c37-84db-8f97270aa2d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: jobscheduler how to

2015-12-18 Thread Zhihong GUO
Hello, I got more logs printed out


12-18 21:41:48.5452850-2850/? D/ActivityManager﹕ isAutoRunBlockedApp::
org.zhihong.test, Auto Run ON
12-18 21:41:48.5452850-2850/? E/LpnetManagerService﹕
isAutoRunBlockedPackage isAutoRunBlocked:false,processName: org.zhihong.test

2015-12-18 19:08 GMT+08:00 Zhihong GUO :

> Hello,
>
> I create a jobscheduler in onReceive method of boot complete receiver. The
> job is not scheduled to run after two minutes. The device is in idle and
> wi-fi connected.
>
> Can anyone give help?
>
> Thanks,
>
> James
>
> public void onReceive(Context context, Intent intent) {
>
> JobScheduler tm =
> (JobScheduler) 
> context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
> tm.cancel(JOB_ID);
>
> JobInfo.Builder builder = new JobInfo.Builder(JOB_ID, new 
> ComponentName(context, TestService.class));
> builder.setPeriodic(TWO_MINUTES);
> builder.setPersisted(true);
> builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED);
> builder.setRequiresDeviceIdle(true);
>
> tm.schedule(builder.build());
> }
>
> then in the TestService
>
>
> @Override
> public boolean onStartJob(final JobParameters params) {
>
> Log.i(LOG_TAG, "job started");
>
> new Thread(new Runnable() {
> @Override
> public void run() {
> //do something here, then call jobFinished
> jobFinished(params, true);
> }
> }).start();
>
> return true;
> }
>
>

-- 
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/CAMhUYgzuEzFNvWWk%2BaRKfAwjRZ8t8D1En7rjZS3th2wpPRz%3D5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] FusedLocationApi does not update location with out interent

2015-12-18 Thread Shashidhar
Hi,
 I have implemented the frequent location updates in my app following the
training @
http://developer.android.com/training/location/receive-location-updates.html .
Every thing works fine when the phone is connected to internet. But the
location does not get updated when there is no internet connection?
Is this expected behavior or do we have a workaround to get the location
updates with out internet? We even tried with setting the priority as
PRIORITY_HIGH_ACCURACY

while
initializing the location request and that did not help with out internet.

Appreciate your Help!

Thanks,
Shashidhar

-- 
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/CAHWL_jP8th63PC7iHWAhCBt_g9VJniN%2BeMFz4jUusLncUvae2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Need help with Tracked channels (UTM) in google play console

2015-12-18 Thread mohan krishna
Need help with Tracked channels (UTM) in google play console (user 
acquisition) please.
I want to track which source is giving me more installs in developer 
console user acquisition section.
I used this link 
https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-url-builder
 
to create urls for different sources and placed them in different sources 
from where i get users. But i don't see any measurement in my user 
acquisition-> performance page in google developer console, even after more 
than one week, i can see other numbers like "Play Store (organic)" for same 
date but "Tracked channels (UTM)" is still zero even after one week.
Thank you in advance for the help.

-- 
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/04f9f30a-42dc-4507-a4e8-98f828ae560e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Different vertical alignment between Android >=5.0 and < 5.0

2015-12-18 Thread lorenzo sfarra
Hello everyone,

I suspect that this can be a well known problem, if it's true, but I cannot 
find anything in this direction...I cannot only find a lot of topics on how 
to generally vertically align elements.

So, I have this layout part:


 
 




Now, when I run this code on an Android version >= 5.0, both the ImageView 
and the TextView are perfectly vertically centered (and the TextView is 
centered with respect to the image, too).
When I run this code on an Android version < 5.0, the TextView is almost at 
the same level of the top of the ImageView.

Can you please provide me any info about this problem, please?

Thanks in advance,
  Lorenzo

-- 
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/8114786f-2e35-4438-8c2d-d3b6eaa9a985%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] make new certificate.pem and key for siging

2015-12-18 Thread Siddhanta Das
how to make new certificate.pem and key for siging purpose of app through 
command prompt.I am new to this .Can any one please help me out??

-- 
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/cb93bbd0-4c84-4033-bbff-5d777ae78e53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Run CheckBox toggle animations in a RecyclerView using DefaultItemAnimator

2015-12-18 Thread Csaba Kozák
I have a RecyclerView, which has CheckBoxes as item views.
My bind method is pretty simple:

checkBox.setChecked(modelItem.isChecked());



I am using the default DetaultItemAnimator for the RecyclerView.
What i want to achieve is if the list item is currently in the viewport, 
run the nice toggle animation on the checkbox when the underlying model is 
changed.
(But the animation should not be shown when the item is just rebound, for 
example when the item is scrolled into viewport).

Currently there is no toggle animation at all, because of this 

 
line i think.

Is there a way to achieve my goal?
Thanks.

-- 
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/b415d1a4-f6e0-4eef-bd82-6861ead8423d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Build app using video camera that stores separate preferences and doesn't prompt to save videos

2015-12-18 Thread David Karr
On Friday, December 18, 2015 at 1:31:45 AM UTC-8, gjs wrote:
>
> Hi,
>
> See 
> http://developer.android.com/guide/topics/media/camera.html#capture-video
>
> For (1) As per the link provided, ordinarily the video is saved to (the 
> nominated) file automatically, there is no prompt to save or discard the 
> (video) file, that would require extra effort if you did wish to discard 
> the file, via a Dialog screen of some sort.
>
> For (2) You can save (and read) your custom "camera" properties as Key 
> Value pairs from persistent memory using SharedPreferences, see 
> http://developer.android.com/reference/android/content/SharedPreferences.html
>  
>
> If you wish to edit your custom "camera" property values you probably need 
> to develop an Activity screen or perhaps just a Dialog if you only have a 
> few things to configure for the camera.
>

Thanks.  I was able to find a small example app to use as a base for this: 
http://examples.javacodegeeks.com/android/core/android-video-capture-example/ 
.  It had some bugs wrt proper ordering of sources, encoders, and formats 
(pretty gnarly to get it all right, and I'm fairly certain it isn't 
bulletproof yet), but it's basically working as advertised.  Now I have to 
make several adjustments to get it closer to what I need. 


> Regards
>
> On Friday, December 18, 2015 at 6:07:13 AM UTC+11, David Karr wrote:
>>
>> I'm a very experienced Java dev, but an Android dev newbie (although I 
>> went through a lot of Eclipse-based Android dev tutorials years ago).
>>
>> I'm starting with a simple open-source app that runs the camcorder 
>> (probably mostly based on a tutorial itself).
>>
>> Using a remote bluetooth button device, I can start the app recording.  I 
>> can use the same device to stop the recording.  On the app, this brings up 
>> a "Save" or "Discard" prompt.  When I click "Save", this saves the video 
>> and then I can click again to get back to the camcorder screen, where I 
>> could then click the record button again.
>>
>> Starting with this, I'm wondering how difficult it would be to implement 
>> the following features:
>>
>> 1. When I click the "stop recording" button, either with the app in front 
>> of me or with the remote bluetooth button (the primary use case), I want it 
>> to just save the video and immediately return to the camcorder screen.  
>> This is the most important feature.
>>
>> 2. The preferences for the app are the common "camera" preferences.  I'd 
>> like to store separate preferences for this, particularly the shutter delay 
>> (I would make it ten seconds by default). This is not critical, although 
>> from the tutorials I went through a few years ago, I think I understand the 
>> basic steps for this.
>>
>> As I said, the first feature is the most important.  If I can't do that, 
>> I won't bother with this.
>>
>> Could someone outline the basic elements of a solution for this?
>>
>

-- 
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/2c0587ae-af08-4791-807c-139dbd9f3228%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Layout structure to display button over camera preview (like in stock camera app)

2015-12-18 Thread David Karr
I'm working with a sample video capture app 
(http://examples.javacodegeeks.com/android/core/android-video-capture-example/).
  
I've made some changes to it, but the basic structure is the same.  The 
layout used displays the preview in a pane on the left side of the screen, 
with a layout containing buttons to the right.  I really need the preview 
to take up the entire screen, and have the button (I'm only going to have 
the "Capture" button, not the "switch camera" button) display at the bottom 
center, just like the stock camera app.

This is really just a layout question.  Can someone show the basic 
structure that would display a single button at the center of the bottom, 
displayed on top of the camera preview?

-- 
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/df0164cc-48f5-420f-bb17-da403f87fbdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Confusion

2015-12-18 Thread mrjasna100
Hi all, i have some question regarding new top game in the new release 
category. i had release my game 3days ago and this morning when i check, it 
appears in number 178 but after a few hours later, my app was totally 
removed from the category. Does anyone knows why this happens? or does 
anyone has any solution to this issue? Thanks

-- 
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/bc0475e3-0ba5-40c4-8346-97aca2c53d28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How do it Display Bitmaps frames per seconds in an ImageView efficiently ?

2015-12-18 Thread fah127
hi, all 

How do it Display Bitmaps frames per seconds in an ImageView efficiently ? 
I am displaying frames per seconds in ImageView from Camera, to prevent 
problems of the Memory Out Error, please

code:

@Override
public void onFrame(final Bitmap mBitmap) {
if (headerImageView != null)
headerImageView.post(new Runnable() {
@Override
public void run() {
try {
if (mBitmap != null && headerImageView != null) {
Logger.logPrintMessage("ONFRAMETest", 
"headerImageView", Constants.showLogs);
((BitmapDrawable) 
headerImageView.getDrawable()).getBitmap().recycle();
headerImageView.setImageBitmap(mBitmap);
hideProgressDialog();
}
} catch (NullPointerException e) {
e.printStackTrace();
} catch (RuntimeException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
});

}

-- 
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/6be06503-191b-4cfc-adea-ff507ec7ee64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android navigation drawer custom design

2015-12-18 Thread naman khator

down votefavorite 


I want to create a navigation drawer which would look something like:

https://dribbble.com/shots/1535815-iShop-Menu-Slide

Is it possible? If yes what should I do. I have no idea where to start 
from. I am guessing I will need to customize the activity layout on drawer 
open/close like making its height and width small by something like this:

http://stackoverflow.com/a/21038169

But if anyone could help me get a kickstart, a code snippet or any relative 
link it would be great.

Thanks

-- 
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/aa022b83-2d70-4dbe-88bf-a3f5d6a1dded%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: How do it Display Bitmaps frames per seconds in an ImageView efficiently ?

2015-12-18 Thread gjs
Hi,

Why not just -

@Override
public void onFrame(final Bitmap mBitmap) {
 try {
if (mBitmap != null && headerImageView != null) {
headerImageView.setImageBitmap(mBitmap);
}
} catch (Exception e) {
e.printStackTrace();
}
  
}


Regards

On Saturday, December 19, 2015 at 8:12:58 AM UTC+11, fah127 wrote:
>
> hi, all 
>
> How do it Display Bitmaps frames per seconds in an ImageView efficiently ? 
> I am displaying frames per seconds in ImageView from Camera, to prevent 
> problems of the Memory Out Error, please
>
> code:
>
> @Override
> public void onFrame(final Bitmap mBitmap) {
> if (headerImageView != null)
> headerImageView.post(new Runnable() {
> @Override
> public void run() {
> try {
> if (mBitmap != null && headerImageView != null) {
> Logger.logPrintMessage("ONFRAMETest", 
> "headerImageView", Constants.showLogs);
> ((BitmapDrawable) 
> headerImageView.getDrawable()).getBitmap().recycle();
> headerImageView.setImageBitmap(mBitmap);
> hideProgressDialog();
> }
> } catch (NullPointerException e) {
> e.printStackTrace();
> } catch (RuntimeException e) {
> e.printStackTrace();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> });
>
> }
>
>

-- 
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/7e1510c7-249e-45db-a016-16b1de058022%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android MVVM framework write in kotlin

2015-12-18 Thread Benny Wang
I'm work on a project KBinding(https://github.com/BennyWang/KBinding.git) 
which work on the binding between View and ViewModel.
Views are created by Anko DSL like 

class MainActivityUI : ViewBinderComponent {
override fun builder(): AnkoContext<*>.() -> Unit = {
verticalLayout {
verticalLayout {
backgroundColor = Color.WHITE
leftPadding = dip(14)
editText {
hint = "请输入手机号或者电子邮箱地址"
bind { text(path="name", mode = BindingMode.TwoWay) }
}.lparams(width = matchParent)
view { backgroundResource = R.color.color_f2 }.lparams(width = 
matchParent, height = 1)
editText {
hint = "请输入密码"
bind{ text(path="password", mode = BindingMode.TwoWay) }
}.lparams(width = matchParent)
}.lparams(width = matchParent)
textView {
text = "登录"
textSizeDimen = R.dimen.font_38
textColor = Color.WHITE
verticalPadding = dip(10.4f)
isClickable = true
bind { click("login") }
bind { enabled(paths=listOf("name", "password"), converter = 
ArrayToBooleanConverter()) }
}.lparams(width = matchParent) { margin = dip(14) }.let { 
it.gravity = Gravity.CENTER }
}
}
}


ViewModel like this

class LoginViewModel(val delegate: LoginViewModel.LoginDelegate) : 
ViewModel() {

var level: Int by Delegates.bindProperty("level", 3)
var name: String by Delegates.bindProperty("name", "...@x.com")
var password: String by Delegates.bindProperty("password", "x")

val login: Command by Delegates.bindCommand("login", Command { it ->
if(name.equals("wangbin")) delegate.onLoginSuccess("wangbin")
else delegate.onLoginFailed(RuntimeException("incorrect name or 
password"))
})

interface LoginDelegate {
fun onLoginSuccess(s: String)
fun onLoginFailed(e: Throwable)
}
}



once binding, the change of viewmodel property will change the display of 
view.



-- 
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/8339dc82-778b-48ee-8d62-4b3d1e4f2487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Android navigation drawer custom design

2015-12-18 Thread niks
go here to this person's 
videos: 
https://www.youtube.com/watch?v=kxgU2hhWToU=PLonJJ3BVjZW4lMlpHgL7UNQSGMERcDzHo=33

follow tutorial 33-37 and you will be able to do what you just asked above.

hope that I did help you ;-)

Τη Σάββατο, 19 Δεκεμβρίου 2015 - 6:02:44 π.μ. UTC+2, ο χρήστης naman khator 
έγραψε:
>
>
> down votefavorite 
> 
>
> I want to create a navigation drawer which would look something like:
>
> https://dribbble.com/shots/1535815-iShop-Menu-Slide
>
> Is it possible? If yes what should I do. I have no idea where to start 
> from. I am guessing I will need to customize the activity layout on drawer 
> open/close like making its height and width small by something like this:
>
> http://stackoverflow.com/a/21038169
>
> But if anyone could help me get a kickstart, a code snippet or any 
> relative link it would be great.
>
> Thanks
>

-- 
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/72f18757-99d3-4b4a-85fe-4d5bb6756bb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Layout structure to display button over camera preview (like in stock camera app)

2015-12-18 Thread gjs
Hi,

Try a FrameLayout 
- http://developer.android.com/reference/android/widget/FrameLayout.html

Regards

On Saturday, December 19, 2015 at 5:20:35 AM UTC+11, David Karr wrote:
>
> I'm working with a sample video capture app (
> http://examples.javacodegeeks.com/android/core/android-video-capture-example/).
>   
> I've made some changes to it, but the basic structure is the same.  The 
> layout used displays the preview in a pane on the left side of the screen, 
> with a layout containing buttons to the right.  I really need the preview 
> to take up the entire screen, and have the button (I'm only going to have 
> the "Capture" button, not the "switch camera" button) display at the bottom 
> center, just like the stock camera app.
>
> This is really just a layout question.  Can someone show the basic 
> structure that would display a single button at the center of the bottom, 
> displayed on top of the camera preview?
>

-- 
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/8fc10e4f-1705-40ba-a604-d105c63818a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: FusedLocationApi does not update location with out interent

2015-12-18 Thread gjs
Hi,

For frequent / accurate location updates try 
http://developer.android.com/reference/android/location/LocationManager.html 
and the onboard GPS receiver, unless of course you have a Pixel C tablet 
which has no onboard GPS receiver ;-)

Regards
 
On Saturday, December 19, 2015 at 2:30:10 AM UTC+11, shashidhar wrote:
>
> Hi,
>  I have implemented the frequent location updates in my app following the 
> training @ 
> http://developer.android.com/training/location/receive-location-updates.html 
> . 
> Every thing works fine when the phone is connected to internet. But the 
> location does not get updated when there is no internet connection? 
> Is this expected behavior or do we have a workaround to get the location 
> updates with out internet? We even tried with setting the priority as 
> PRIORITY_HIGH_ACCURACY 
> 
>  while 
> initializing the location request and that did not help with out internet.
>
> Appreciate your Help!
>
> Thanks,
> Shashidhar
>

-- 
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/a8b96ec9-d263-4247-82e1-24d350fad93b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.